drewcrawford/JucheLog — Issue #5: Replace use of IOKit since it doesn't compile for the device out of the box
Author: carlbrown
Created: 2012-01-13 13:31:04+00:00
State: open

Error is:
```

/Users/carlb/src/JucheLog/JucheLog/JucheLog.m:25:5: error: use of undeclared identifier 'io_struct_inband_t' [3]
io_struct_inband_t iokit_entry;
^
/Users/carlb/src/JucheLog/JucheLog/JucheLog.m:27:5: error: use of undeclared identifier 'io_registry_entry_t' [3]
io_registry_entry_t ioRegistryRoot = IORegistryEntryFromPath(kIOMasterPortDefault, "IOService:/");
^
/Users/carlb/src/JucheLog/JucheLog/JucheLog.m:28:5: warning: implicit declaration of function 'IORegistryEntryGetProperty' is invalid in C99 [-Wimplicit-function-declaration,3]
IORegistryEntryGetProperty(ioRegistryRoot, kIOPlatformSerialNumberKey, iokit_entry, &bufferSize);
^
/Users/carlb/src/JucheLog/JucheLog/JucheLog.m:28:32: error: use of undeclared identifier 'ioRegistryRoot' [3]
IORegistryEntryGetProperty(ioRegistryRoot, kIOPlatformSerialNumberKey, iokit_entry, &bufferSize);
^
/Users/carlb/src/JucheLog/JucheLog/JucheLog.m:29:55: error: use of undeclared identifier 'iokit_entry' [3]
serialNumberString = [NSString stringWithCString: iokit_entry encoding: NSASCIIStringEncoding];
^
/Users/carlb/src/JucheLog/JucheLog/JucheLog.m:30:5: warning: implicit declaration of function 'IOObjectRelease' is invalid in C99 [-Wimplicit-function-declaration,3]
IOObjectRelease((unsigned int) iokit_entry);
^
/Users/carlb/src/JucheLog/JucheLog/JucheLog.m:30:36: error: use of undeclared identifier 'iokit_entry' [3]
IOObjectRelease((unsigned int) iokit_entry);
^
/Users/carlb/src/JucheLog/JucheLog/JucheLog.m:31:21: error: use of undeclared identifier 'ioRegistryRoot' [3]
IOObjectRelease(ioRegistryRoot);
^
2 warnings and 6 errors generated.
```

There may be some mechanism to jump through hoops to get this to work, but, in my opinion, there are easier alternatives