summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@dtucker.net>2022-02-22 12:27:07 +1100
committerDarren Tucker <dtucker@dtucker.net>2022-02-22 12:27:07 +1100
commita4b325a3fc82d11e0f5d61f62e7fde29415f7afb (patch)
treefc09d331db1c64a8df62b1027e339f65f6c5b9d6
parent5a102e9cb287a43bd7dfe594b775a89a8e94697c (diff)
Include sys/param.h if present.
Needed for howmany() on MUSL systems such as Alpine.
-rw-r--r--configure.ac1
-rw-r--r--openbsd-compat/bsd-poll.c3
2 files changed, 4 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index a22eb444..eb2872c6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -456,6 +456,7 @@ AC_CHECK_HEADERS([ \
sys/mman.h \
sys/label.h \
sys/ndir.h \
+ sys/param.h \
sys/poll.h \
sys/prctl.h \
sys/procctl.h \
diff --git a/openbsd-compat/bsd-poll.c b/openbsd-compat/bsd-poll.c
index f8b427fc..781ee978 100644
--- a/openbsd-compat/bsd-poll.c
+++ b/openbsd-compat/bsd-poll.c
@@ -19,6 +19,9 @@
#include <sys/types.h>
#include <sys/time.h>
+#ifdef HAVE_SYS_PARAM_H
+# include <sys/param.h>
+#endif
#ifdef HAVE_SYS_SELECT_H
# include <sys/select.h>
#endif