winecfg/drivedetect.c breaks portability (#include <mntent.h>)

Gerald Pfeifer gerald at
Wed Nov 24 05:44:38 CST 2004

The addition of winecfg/drivedetect.c via

  revision 1.1
  date: 2004/11/23 13:50:23;  author: julliard;  state: Exp;
  Mike Hearn <mike at>
  - More heapification.
  - Split drive code into core, UI and autodetect.
  - Implement drive autodetection.
  - Slight redesign of drive tab.
  - Code cleanup.

broke FreeBSD 4.10 which does not have <mntent.h>:

  /sw/gcc-3.3.4/bin/gcc -c -I. -I. -I../../include -I../../include    
  -D_REENTRANT -fPIC -Wall -pipe -mpreferred-stack-boundary=2 
  -fno-strict-aliasing -gstabs+ -Wpointer-arith  -g -O2 -o drivedetect.o drivedetect.c
  drivedetect.c:28:20: mntent.h: No such file or directory

In fact, FreeBSD 4.10 does not have getmntent() at all which leads to
further breakage even if you properly autoconf for <mntent.h>:

  drivedetect.c:206: warning: implicit declaration of function `getmntent'

The Linux man page states

  SysV  also has a getmntent() function but the calling sequence differs,
  and the returned structure is  different.  Under  SysV  /etc/mnttab  is
  used.   BSD 4.4 and Digital Unix have a routine getmntinfo(), a wrapper
  around the system call getfsstat(). has the man
page for FreeBSD.

Gerald Pfeifer (Jerry)   gerald at

More information about the wine-devel mailing list