Fix newlines from copying code from my MacMini.
#include <IOKit/IOKitLib.h>
// This would be better than int gethostuuid(uuid_t id, const struct timespec *wait);
-
void get_platform_uuid(char * buf, int bufSize)
-
{
io_registry_entry_t ioRegistryRoot = IORegistryEntryFromPath(kIOMasterPortDefault, "IOService:/");
-
CFStringRef uuidCf = (CFStringRef) IORegistryEntryCreateCFProperty(ioRegistryRoot, CFSTR(kIOPlatformUUIDKey), kCFAllocatorDefault, 0);
-
IOObjectRelease(ioRegistryRoot);
-
CFStringGetCString(uuidCf, buf, bufSize, kCFStringEncodingMacRoman);
-
CFRelease(uuidCf);
-
}
#endif // TARGET_MAC_OS
