[libdvdcss-devel] [PATCH] build: Replace system-specific ifdeffery by proper sys/uio.h check

Diego Biurrun diego at biurrun.de
Thu Feb 14 00:10:21 CET 2013


Signed-off-by: Diego Biurrun <diego at biurrun.de>
---
 configure.ac |    2 +-
 src/device.c |    6 ------
 src/device.h |    4 +++-
 3 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/configure.ac b/configure.ac
index 9c89494..dac549f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -17,7 +17,7 @@ AC_C_CONST
 AC_C_INLINE
 AC_TYPE_SIZE_T
 
-AC_CHECK_HEADERS(unistd.h sys/param.h limits.h pwd.h errno.h)
+AC_CHECK_HEADERS(unistd.h sys/param.h sys/uio.h limits.h pwd.h errno.h)
 
 dnl
 dnl  Check the operating system
diff --git a/src/device.c b/src/device.c
index e8042f4..d8ea194 100644
--- a/src/device.c
+++ b/src/device.c
@@ -49,12 +49,6 @@
 #   include <limits.h>
 #endif
 
-#if defined( WIN32 ) && !defined( __CYGWIN__ )
-#   include <io.h>                                                 /* read() */
-#else
-#   include <sys/uio.h>                                      /* struct iovec */
-#endif
-
 #ifdef DARWIN_DVD_IOCTL
 #   include <paths.h>
 #   include <CoreFoundation/CoreFoundation.h>
diff --git a/src/device.h b/src/device.h
index 9ad24b0..fd58066 100644
--- a/src/device.h
+++ b/src/device.h
@@ -26,10 +26,12 @@
 #ifndef DVDCSS_DEVICE_H
 #define DVDCSS_DEVICE_H
 
+#include "config.h"
+
 /*****************************************************************************
  * iovec structure: vectored data entry
  *****************************************************************************/
-#if defined( WIN32 ) && !defined( __CYGWIN__ )
+#ifndef HAVE_SYS_UIO_H
 #   include <io.h>                                                 /* read() */
 struct iovec
 {
-- 
1.7.9.5



More information about the libdvdcss-devel mailing list