dlls/ntdll/cdrom.c broken on FreeBSD
Gerald Pfeifer
pfeifer at dbai.tuwien.ac.at
Tue Apr 2 07:34:10 CST 2002
On FreeBSD 4.5, dlls/ntdll/cdrom.c won't compile any longer due to the
following:
revision 1.5
date: 2002/03/29 17:57:43; author: julliard; state: Exp; lines: +3 -1
Andreas Mohr <andi at rhlx01.fht-esslingen.de>
Added mapping for errno ENOMEDIUM to STATUS_NO_MEDIA_IN_DEVICE.
/usr/bin/gcc -c -I. -I. -I../../include -I../../include -g -O2 -Wall -mpreferred-stack-boundary=2 -fPIC -D__WINE__ -D_NTSYSTEM_ -D_REENTRANT -I/usr/X11R6/include -o cdrom.o cdrom.c
cdrom.c: In function `CDROM_GetStatusCode':
cdrom.c:113: `ENOMEDIUM' undeclared (first use in this function)
cdrom.c:113: (Each undeclared identifier is reported only once
cdrom.c:113: for each function it appears in.)
gmake[2]: *** [cdrom.o] Error 1
gmake[2]: Leaving directory `/.amd_mnt/vexpert/files8/test/wine/dlls/ntdll'
The following patch fixes this in a portable way:
ChangeLog:
Gerald Pfeifer <pfeifer at dbai.tuwien.ac.at>
Use ENOMEDIUM errno code only when defined.
Index: cdrom.c
===================================================================
RCS file: /home/wine/wine/dlls/ntdll/cdrom.c,v
retrieving revision 1.6
diff -u -3 -p -r1.6 cdrom.c
--- cdrom.c 1 Apr 2002 21:08:16 -0000 1.6
+++ cdrom.c 2 Apr 2002 13:32:12 -0000
@@ -110,7 +110,9 @@ static DWORD CDROM_GetStatusCode(int io)
switch (errno)
{
case EIO:
+#ifdef ENOMEDIUM
case ENOMEDIUM:
+#endif
return STATUS_NO_MEDIA_IN_DEVICE;
}
FIXME("Unmapped error code %d: %s\n", errno, strerror(errno));
More information about the wine-patches
mailing list