--- a/explain/syscall/ustat.c +++ b/explain/syscall/ustat.c @@ -30,7 +30,7 @@ #include -#ifndef HAVE_USTAT +#if !defined(HAVE_USTAT_H) && !defined(LINUX_TYPES_H_STRUCT_USTAT) struct ustat { --- a/libexplain/buffer/enfile.c +++ b/libexplain/buffer/enfile.c @@ -38,7 +38,7 @@ get_maxfile(void) { if (explain_option_dialect_specific()) { -#ifdef __linux__ +#ifdef SYS__sysctl /* * In the linux kernel, if get_empty_filp() returns NULL, the open * system call (and others) will return ENFILE. --- a/libexplain/buffer/errno/listen.c +++ b/libexplain/buffer/errno/listen.c @@ -72,7 +72,7 @@ append_getsockname(explain_string_buffer_t *sb, int fildes) static int get_somaxconn(void) { -#ifdef __linux__ +#ifdef SYS__sysctl struct __sysctl_args args; long somaxconn; size_t somaxconn_size = sizeof(somaxconn);