diff options
Diffstat (limited to 'libdwfl/linux-kernel-modules.c')
| -rw-r--r-- | libdwfl/linux-kernel-modules.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libdwfl/linux-kernel-modules.c b/libdwfl/linux-kernel-modules.c index 893110ae..6c6c6037 100644 --- a/libdwfl/linux-kernel-modules.c +++ b/libdwfl/linux-kernel-modules.c @@ -156,11 +156,15 @@ try_kernel_name (Dwfl *dwfl, char **fname, bool try_debug) static inline const char * kernel_release (void) { +#ifdef __linux__ /* Cache the `uname -r` string we'll use. */ static struct utsname utsname; if (utsname.release[0] == '\0' && uname (&utsname) != 0) return NULL; return utsname.release; +#else + return NULL; +#endif } static int |
