summaryrefslogtreecommitdiff
path: root/camlibs/mustek/io.c
diff options
context:
space:
mode:
authorDaniel P. Berrange <dan@berrange.com>2014-06-04 18:13:43 +0000
committerDaniel P. Berrange <dan@berrange.com>2014-06-04 18:13:43 +0000
commit5bc858cd44ab6131efbf5e3bb74d450044b5ce03 (patch)
treece0418ca702fdcce088e29b0713318a11482b2a4 /camlibs/mustek/io.c
parent00953fd2d472b845eefb6a48ada4d922356f82e7 (diff)
downloadlibgphoto2-5bc858cd44ab6131efbf5e3bb74d450044b5ce03.tar.gz
Add <unistd.h> to files which use usleep()
The usleep() function is defined to be provided by unistd.h. On Linux this is pulled in indirectly so the missing includes don't cause build problems, but on Mingw32 the explicit include of unistd.h is required. Since sleep() is not available on Mingw32, #define it to usleep(). Remove some _POSIX_C_SOURCE macros which restricted code to 1993 POSIX standard which blocks use of usleep(). git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14997 67ed7778-7388-44ab-90cf-0a291f65f57c
Diffstat (limited to 'camlibs/mustek/io.c')
-rw-r--r--camlibs/mustek/io.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/camlibs/mustek/io.c b/camlibs/mustek/io.c
index 55ad4b9bc..dbff9dfd4 100644
--- a/camlibs/mustek/io.c
+++ b/camlibs/mustek/io.c
@@ -35,6 +35,7 @@
#include "io.h"
#include <string.h>
#include <sys/time.h>
+#include <unistd.h>
#include "print.h"
#include "rs232.h"
#include "usb.h"