shithub: libdvdcss

Download patch

ref: c5ef915232b096cbe750465066089bf926eea22a
parent: 0e48b8313f3b70bc0cb0806385f4c5786efd0c64
author: Diego Biurrun <diego@biurrun.de>
date: Wed Feb 13 19:10:21 EST 2013

build: Replace system-specific ifdeffery by proper sys/uio.h check

Signed-off-by: Diego Biurrun <diego@biurrun.de>
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>

--- a/configure.ac
+++ b/configure.ac
@@ -17,7 +17,7 @@
 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
--- 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>
--- 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
 {