PATCH: fix dlls/ntdll/cdrom.c breakage

Gerald Pfeifer gerald at pfeifer.com
Tue Jun 15 03:12:37 CDT 2004


The following patch to dlls/ntdll/cdrom.c

  revision 1.46
  date: 2004/06/15 00:45:01;  author: julliard;  state: Exp;  lines: +421 -1
  Uwe Bonnes <bon at elektron.ikp.physik.tu-darmstadt.de>
  Support for reading encrypted DVDs.

causes a build failure on all FreeBSD (and it seems also NetBSD) platforms:

  cdrom.c: In function `DVD_EndSession':
  cdrom.c:1739: error: `dev' undeclared (first use in this function)
  cdrom.c:1739: error: (Each undeclared identifier is reported only once
  cdrom.c:1739: error: for each function it appears in.)
  cdrom.c:1739: error: `rmv' undeclared (first use in this function)
  gmake[2]: *** [cdrom.o] Error 1
  gmake[2]: Leaving directory `/.amd_mnt/nashira/files5/test/wine/dlls/ntdll'
  gmake[1]: *** [ntdll] Error 2

There is BSD-specific code in this function, but both dev and rmv do not
appear anywhere, so I guess this was copied from somewhere else and then
not adjusted?

  #elif defined(__FreeBSD__) || defined(__NetBSD__)
    return CDROM_GetStatusCode(ioctl(cdrom_cache[dev].fd, (rmv->PreventMediaRemoval) ? CDIOCPREVENT : CDIOCALLOW, NULL));
  #else

In any case, the patch below works around this.

Gerald

ChangeLog:
Remove incorrect support for FreeBSD and NetBSD in DVD_StartSession().
Index: cdrom.c
===================================================================
RCS file: /home/wine/wine/dlls/ntdll/cdrom.c,v
retrieving revision 1.46
diff -u -3 -p -r1.46 cdrom.c
--- cdrom.c	15 Jun 2004 00:45:01 -0000	1.46
+++ cdrom.c	15 Jun 2004 08:08:02 -0000
@@ -1736,7 +1736,7 @@ static NTSTATUS DVD_EndSession(int fd, P
     TRACE("\n");
     return CDROM_GetStatusCode(ioctl(fd, DVD_AUTH, &auth_info));
 #elif defined(__FreeBSD__) || defined(__NetBSD__)
-    return CDROM_GetStatusCode(ioctl(cdrom_cache[dev].fd, (rmv->PreventMediaRemoval) ? CDIOCPREVENT : CDIOCALLOW, NULL));
+    return STATUS_NOT_SUPPORTED;
 #else
     return STATUS_NOT_SUPPORTED;
 #endif



More information about the wine-patches mailing list