Skip to content

Commit

Permalink
guard sysctl.h include with pre-existing autoconf check
Browse files Browse the repository at this point in the history
* HAVE_SYSCTLBYNAME and HAVE_SYS_SYSCTL could be paired together as
  sysctlbyname isn't available if sysctl.h isn't available.
* Sysctl syscall isn't available in linux >=5.5 and the header
  is absent in glibc-2.32 and musl-1.0.0

Closes: #87
Signed-off-by: Alfred Wingate <parona@protonmail.com>
  • Loading branch information
parona-source committed Oct 28, 2023
1 parent 290d886 commit f7b886b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libxo/xo_syslog.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@
#include <stdarg.h>
#include <sys/time.h>
#include <sys/types.h>
#ifdef HAVE_SYS_SYSCTL
#include <sys/sysctl.h>
#endif

#include "xo_config.h"
#include "xo.h"
Expand Down

0 comments on commit f7b886b

Please sign in to comment.