summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 58c9148)
raw | patch | inline | side by side (parent: 58c9148)
author | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Fri, 25 Dec 2015 10:19:29 +0000 (11:19 +0100) | ||
committer | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Thu, 4 Aug 2016 09:22:40 +0000 (11:22 +0200) |
src/uuid.c | patch | blob | history |
diff --git a/src/uuid.c b/src/uuid.c
index 816e624a0cb29ef1ace6e61925a513d0bbde9f3d..a607d61926db74fabb5561d646a2f2fcd0d70d2f 100644 (file)
--- a/src/uuid.c
+++ b/src/uuid.c
return (uuid);
}
-#if defined(__APPLE__) || defined(__FreeBSD__)
+#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__)
static char *
uuid_get_from_sysctlbyname(const char *name)
{
#elif defined(__FreeBSD__)
if ((uuid = uuid_get_from_sysctlbyname("kern.hostuuid")) != NULL)
return (uuid);
+#elif defined(__NetBSD__)
+ if ((uuid = uuid_get_from_sysctlbyname("machdep.dmi.system-uuid")) != NULL)
+ return (uuid);
#elif defined(__linux__)
if ((uuid = uuid_get_from_file("/sys/class/dmi/id/product_uuid")) != NULL)
return (uuid);