[Patch] Fix ntdll compilation on Darwin, 2nd try.

Phil Krylov phil at newstar.rinet.ru
Fri Jul 1 09:10:56 CDT 2005


ChangeLog:

Fixed dlls/ntdll/cdrom.c compilation in Darwin by adding HAVE_IOKit
detection to configure and defining SENSEBUFLEN as kSenseDefaultSize (which
is corresponding IOKit enum value).

Patch:

Index: configure.ac
===================================================================
RCS file: /home/wine/wine/configure.ac,v
retrieving revision 1.370
diff -p -u -r1.370 configure.ac
--- configure.ac	30 Jun 2005 20:46:59 -0000	1.370
+++ configure.ac	1 Jul 2005 13:02:29 -0000
@@ -723,6 +723,11 @@ AC_CHECK_HEADERS(capi20.h,[
 	])
 ])
 
+dnl **** Check for IOKit (used in Darwin) ****
+AC_CHECK_HEADERS(IOKit/IOKitLib.h,[
+	AC_DEFINE(HAVE_IOKIT,1,[Define if you have IOKit headers])
+])
+
 dnl **** Check for broken glibc mmap64 ****
 
 AC_CACHE_CHECK( [whether mmap64 works defined as mmap], ac_cv_mmap64_works,
Index: dlls/ntdll/cdrom.c
===================================================================
RCS file: /home/wine/wine/dlls/ntdll/cdrom.c,v
retrieving revision 1.60
diff -p -u -r1.60 cdrom.c
--- dlls/ntdll/cdrom.c	30 Jun 2005 10:19:26 -0000	1.60
+++ dlls/ntdll/cdrom.c	1 Jul 2005 13:02:30 -0000
@@ -75,6 +75,14 @@
 # include <sys/scsiio.h>
 #endif
 
+#ifdef HAVE_IOKIT
+# ifndef SENSEBUFLEN
+#  include <IOKit/IOKitLib.h>
+#  include <IOKit/scsi/SCSICmds_REQUEST_SENSE_Defs.h>
+#  define SENSEBUFLEN kSenseDefaultSize
+# endif
+#endif
+
 #define NONAMELESSUNION
 #define NONAMELESSSTRUCT
 #include "ntstatus.h"




More information about the wine-patches mailing list