diff options
author | Steve Bennett <steveb@workware.net.au> | 2016-09-30 09:34:23 +1000 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2016-10-06 08:29:40 +1000 |
commit | 6c3e0de7b55814c378ea19b4ddcf7a78b6208789 (patch) | |
tree | b2c2b4373ae262ec8cf0f55afd8d9fe436fdeeed /jim-eventloop.c | |
parent | 59b01337d880b0caa2b615ca040d6f71eac15ffd (diff) | |
download | jimtcl-6c3e0de7b55814c378ea19b4ddcf7a78b6208789.zip jimtcl-6c3e0de7b55814c378ea19b4ddcf7a78b6208789.tar.gz jimtcl-6c3e0de7b55814c378ea19b4ddcf7a78b6208789.tar.bz2 |
eventloop: Don't assume unistd.h and sys/time.h
Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'jim-eventloop.c')
-rw-r--r-- | jim-eventloop.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/jim-eventloop.c b/jim-eventloop.c index 1bbd171..09e946a 100644 --- a/jim-eventloop.c +++ b/jim-eventloop.c @@ -41,18 +41,22 @@ #include <jim.h> #include <jim-eventloop.h> -/* POSIX includes */ -#include <sys/time.h> -#include <sys/types.h> +#include <time.h> #include <string.h> -#include <unistd.h> #include <errno.h> +#ifdef HAVE_UNISTD_H +#include <unistd.h> +#endif +#ifdef HAVE_SYS_TIME_H +#include <sys/time.h> +#endif #if defined(__MINGW32__) #include <windows.h> #include <winsock.h> #define msleep Sleep #else +#include <sys/types.h> #ifdef HAVE_SYS_SELECT_H #include <sys/select.h> #endif |