use haeders check to include unistd.h
authorVincent Torri <vincent.torri@gmail.com>
Sun, 15 May 2011 11:21:20 +0000 (11:21 +0000)
committerVincent Torri <vincent.torri@gmail.com>
Sun, 15 May 2011 11:21:20 +0000 (11:21 +0000)
SVN revision: 59401

legacy/eet/configure.ac
legacy/eet/src/lib/eet_cipher.c
legacy/eet/src/lib/eet_lib.c

index 465d033..fbe8635 100644 (file)
@@ -341,7 +341,7 @@ AC_CHECK_HEADER([jpeglib.h],
    [dummy="yes"],
    [AC_MSG_ERROR("Cannot find jpeglib.h. Make sure your CFLAGS environment variable contains include lines for the location of this file")])
 
-AC_CHECK_HEADERS(netinet/in.h)
+AC_CHECK_HEADERS(netinet/in.h unistd.h)
 EFL_CHECK_PATH_MAX
 
 ### Checks for types
index 6eff8de..231734d 100644 (file)
@@ -25,9 +25,9 @@ void *    alloca (size_t);
 #include <sys/stat.h>
 #include <sys/mman.h>
 
-#ifndef _MSC_VER
+#ifdef HAVE_UNISTD_H
 # include <unistd.h>
-#endif /* ifndef _MSC_VER */
+#endif /* ifdef HAVE_UNISTD_H */
 
 #ifdef HAVE_NETINET_IN_H
 # include <netinet/in.h>
index 7206ed9..2050eb6 100644 (file)
@@ -34,9 +34,9 @@ void *    alloca (size_t);
 #include <fcntl.h>
 #include <zlib.h>
 
-#ifndef _MSC_VER
+#ifdef HAVE_UNISTD_H
 # include <unistd.h>
-#endif /* ifndef _MSC_VER */
+#endif /* ifdef HAVE_UNISTD_H */
 
 #ifdef HAVE_NETINET_IN_H
 # include <netinet/in.h>