emu_msvcrt.cpp: include `mntent.h` independently of `HAS_DVD_DRIVE`
authorPaul Menzel <paulepanter@users.sourceforge.net>
Thu, 17 Mar 2011 08:39:31 +0000 (09:39 +0100)
committerS. Davilla <davilla@4pi.com>
Tue, 22 Mar 2011 16:52:33 +0000 (12:52 -0400)
commitf5388977908f67406042a3d4508620d3f9a3bf64
tree04e1113304f08794da32ce96b71b23e281a0d28a
parent982d4458fd56c873f90160df5a4e953198379efc
emu_msvcrt.cpp: include `mntent.h` independently of `HAS_DVD_DRIVE`

With commit c4175e43ee3f22e353af1faf07a26978c35da37c [1] `mntent.h` is only included when `HAS_DVD_DRIVE` is defined. This results in the following compile error using OpenEmbedded [2] with `angstrom-2008.1` and `MACHINE = "beagleboard"` with the configure option `--disable-optical-drive`.

arm-angstrom-linux-gnueabi-g++ -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -mthumb-interwork -mno-thumb --sysroot=/oe/build/angstrom-dev/sysroots/armv7a-angstrom-linux-gnueabi -MD -c -fexpensive-optimizations -frename-registers -fomit-frame-pointer -O2 -ggdb2 -fpermissive -fvisibility-inlines-hidden -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -g -D_DEBUG -Wall -O2 -mfloat-abi=softfp -mno-apcs-stack-check -Wa,-march=armv7a -mcpu=cortex-a8 -mfpu=neon -mvectorize-with-neon-quad -fexpensive-optimizations -frename-registers -fomit-frame-pointer -O2 -ggdb2 -fpermissive -fvisibility-inlines-hidden -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -g -D_DEBUG -Wall -O2 -mfloat-abi=softfp -mno-apcs-stack-check -Wa,-march=armv7a -mcpu=cortex-a8 -mfpu=neon -mvectorize-with-neon-quad -fexpensive-optimizations -frename-registers -fomit-frame-pointer -O2 -ggdb2 -fpermissive -fvisibility-inlines-hidden -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -g -D_DEBUG -Wall -O2 -mfloat-abi=softfp -mno-apcs-stack-check -Wa,-march=armv7a -mcpu=cortex-a8 -mfpu=neon -mvectorize-with-neon-quad -D_LINUX -D_FILE_DEFINED -D__STDC_CONSTANT_MACROS -DBIN_INSTALL_PATH="\"/usr/lib/xbmc\"" -DINSTALL_PATH="\"/usr/share/xbmc\"" -DHAS_SDL_JOYSTICK -D'GIT_REV="Unknown"' -D_ARMEL -DHAVE_CONFIG_H  -D_GNU_SOURCE=1 -D_REENTRANT -I/oe/build/angstrom-dev/sysroots/armv7a-angstrom-linux-gnueabi/usr/include/SDL -I/oe/build/angstrom-dev/sysroots/armv7a-angstrom-linux-gnueabi/usr/include/alsa -I/oe/build/angstrom-dev/sysroots/armv7a-angstrom-linux-gnueabi/usr/include/dbus-1.0 -I/oe/build/angstrom-dev/sysroots/armv7a-angstrom-linux-gnueabi/usr/include/freetype2 -I/oe/build/angstrom-dev/sysroots/armv7a-angstrom-linux-gnueabi/usr/include/fribidi -I/oe/build/angstrom-dev/sysroots/armv7a-angstrom-linux-gnueabi/usr/include/libpng12 -I/oe/build/angstrom-dev/sysroots/armv7a-angstrom-linux-gnueabi/usr/lib/dbus-1.0/include -I/oe/build/angstrom-dev/sysroots/i686-linux/usr/armv7a/include -I/oe/build/angstrom-dev/work/armv7a-angstrom-linux-gnueabi/xbmc-10.05-r11+gitr0+c4d98da91c7f1b5d3c557240a787c666f79037e9/git -I/oe/build/angstrom-dev/work/armv7a-angstrom-linux-gnueabi/xbmc-10.05-r11+gitr0+c4d98da91c7f1b5d3c557240a787c666f79037e9/git/lib -I/oe/build/angstrom-dev/work/armv7a-angstrom-linux-gnueabi/xbmc-10.05-r11+gitr0+c4d98da91c7f1b5d3c557240a787c666f79037e9/git/xbmc -I/oe/build/angstrom-dev/work/armv7a-angstrom-linux-gnueabi/xbmc-10.05-r11+gitr0+c4d98da91c7f1b5d3c557240a787c666f79037e9/git/xbmc/linux emu_msvcrt.cpp -o emu_msvcrt.o
emu_msvcrt.cpp:1: warning: switch -mcpu=cortex-a8 conflicts with -march= switch
mv -f .deps/pscan.Tpo .deps/pscan.Plo

emu_msvcrt.cpp: In function 'FILE* dll_fopen(const char*, const char*)':
emu_msvcrt.cpp:1168: error: 'MOUNTED' was not declared in this scope
emu_msvcrt.cpp:1169: error: 'MNTTAB' was not declared in this scope
emu_msvcrt.cpp: In function 'mntent* dll_getmntent(FILE*)':
emu_msvcrt.cpp:2159: error: 'getmntent' was not declared in this scope
make[2]: *** [emu_msvcrt.o] Error 1
make[2]: Leaving directory `/oe/build/angstrom-dev/work/armv7a-angstrom-linux-gnueabi/xbmc-10.05-r11+gitr0+c4d98da91c7f1b5d3c557240a787c666f79037e9/git/xbmc/cores/DllLoader/exports'
make[1]: *** [xbmc/cores/DllLoader/exports/exports.a] Error 2
make[1]: Leaving directory `/oe/build/angstrom-dev/work/armv7a-angstrom-linux-gnueabi/xbmc-10.05-r11+gitr0+c4d98da91c7f1b5d3c557240a787c666f79037e9/git'
make: *** [exports] Error 2
make: *** Waiting for unfinished jobs....

Including `mntent.h` again fixes this error.

[1] https://github.com/xbmc/xbmc/commit/c4175e43ee3f22e353af1faf07a26978c35da37c
[2] http://www.openembedded.org/

Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
Signed-off-by: S. Davilla <davilla@4pi.com>
xbmc/cores/DllLoader/exports/emu_msvcrt.cpp