ptpclock: Only include unistd.h if found
authorNirbheek Chauhan <nirbheek@centricular.com>
Sat, 13 Feb 2016 01:12:06 +0000 (06:42 +0530)
committerTim-Philipp Müller <tim@centricular.com>
Sat, 20 Feb 2016 10:07:31 +0000 (10:07 +0000)
unistd.h is not provided by the  Microsoft Visual C++ compiler. It instead
provides the necessary defines through io.h

libs/gst/net/gstptpclock.c

index d0aaa31..1414faf 100644 (file)
 #include <windows.h>
 #endif
 #include <sys/types.h>
+
+#ifdef HAVE_UNISTD_H
 #include <unistd.h>
+#elif defined(G_OS_WIN32)
+#include <io.h>
+#endif
 
 #include <gst/base/base.h>