Hi all,
I'm trying to compile IONetworkingFamily-46 as a kext, using Xcode 3.1 and OS X 10.5.2. This is my first attempt at compiling an Apple kext, so bear with me. I downloaded IONetworkingFamily-46.tar.gz from Apple's opensource website, untar'd, opened the project in Xcode and clicked Build. Build fails with the error:
error: 'SIOCSIFDEVMTU' was not declared in this scope
There are other constants that the compiler doesn't complain about, such as SIOCSIFFLAGS but I've been unable to figure out which header file they are declared in.
/Developer/usr/bin/g++-4.0 -c -I/Users/ryan/src/c/IONetworkingFamily-46/build/IONetworkingFamily.build/Development/IONetworkingFamily.build/IONetworkingFamily.hmap -F/Users/ryan/src/c/IONetworkingFamily-46/build/Development -I/Users/ryan/src/c/IONetworkingFamily-46/build/Development/include -arch i386 -fno-common -nostdinc -O0 -Wmost -Wno-four-char-constants -Wno-unknown-pragmas -I/System/Library/Frameworks/Kernel.framework/PrivateHeaders -I/System/Library/Frameworks/Kernel.framework/Headers -fno-builtin -finline -fno-keep-inline-functions -force_cpusubtype_ALL -fno-rtti -fno-exceptions -fcheck-new -msoft-float -fapple-kext -static -DKERNEL -DKERNEL_PRIVATE -DDRIVER_PRIVATE -DAPPLE -DNeXT -pipe "-fmessage-length=0" -g -I/Users/ryan/src/c/IONetworkingFamily-46/build/IONetworkingFamily.build/Development/IONetworkingFamily.build/DerivedSources
-I/Users/ryan/src/c/IONetworkingFamily-46/build/IONetworkingFamily.build/Development/IONetworkingFamily.build/DerivedSources "-D__MBUF_TRANSITION_" IOEthernetController.cpp -o /Users/ryan/src/c/IONetworkingFamily-46/build/IONetworkingFamily.build/Development/IONetworkingFamily.build/Objects-normal/i386/IOEthernetController.o
/Developer/usr/bin/g++-4.0 -c -I/Users/ryan/src/c/IONetworkingFamily-46/build/IONetworkingFamily.build/Development/IONetworkingFamily.build/IONetworkingFamily.hmap -F/Users/ryan/src/c/IONetworkingFamily-46/build/Development
-I/Users/ryan/src/c/IONetworkingFamily-46/build/Development/include -arch i386 -fno-common -nostdinc -O0 -Wmost -Wno-four-char-constants -Wno-unknown-pragmas -I/System/Library/Frameworks/Kernel.framework/PrivateHeaders -I/System/Library/Frameworks/Kernel.framework/Headers -fno-builtin -finline -fno-keep-inline-functions -force_cpusubtype_ALL -fno-rtti -fno-exceptions -fcheck-new -msoft-float -fapple-kext -static -DKERNEL -DKERNEL_PRIVATE -DDRIVER_PRIVATE -DAPPLE -DNeXT -pipe "-fmessage-length=0" -g -I/Users/ryan/src/c/IONetworkingFamily-46/build/IONetworkingFamily.build/Development/IONetworkingFamily.build/DerivedSources -I/Users/ryan/src/c/IONetworkingFamily-46/build/IONetworkingFamily.build/Development/IONetworkingFamily.build/DerivedSources "-D__MBUF_TRANSITION_" IOEthernetInterface.cpp -o
/Users/ryan/src/c/IONetworkingFamily-46/build/IONetworkingFamily.build/Development/IONetworkingFamily.build/Objects-normal/i386/IOEthernetInterface.o
IOEthernetInterface.cpp: In member function 'virtual SInt32 IOEthernetInterface::performCommand(IONetworkController*, UInt32, void*, void*)':
IOEthernetInterface.cpp:432: error: 'SIOCSIFDEVMTU' was not declared in this scope
IOEthernetInterface.cpp: In static member function 'static int IOEthernetInterface::performGatedCommand(void*, void*, void*, void*, void*)':
IOEthernetInterface.cpp:498: error: 'SIOCSIFDEVMTU' was not declared in this scope
IOEthernetInterface.cpp: In member function 'void IOEthernetInterface::_fixupVlanPacket(__mbuf*, u_int16_t, int)':
IOEthernetInterface.cpp:1259: error: 'M_DONTWAIT' was not declared in this scope