Browse Source

build: Check <sys/proc.h> by also including <sys/param.h>

On several BSD systems the header is not self-contained and requires
<sys/param.h> to compile, add the pre-requisite so that the check
succeeds there.
Guillem Jover 7 years ago
parent
commit
5c32516dca
2 changed files with 8 additions and 1 deletions
  1. 5 1
      configure.ac
  2. 3 0
      debian/changelog

+ 5 - 1
configure.ac

@@ -104,11 +104,15 @@ AC_CHECK_HEADERS([\
   sys/sysctl.h \
   sys/syscall.h \
   sys/user.h \
-  sys/proc.h \
   sys/procfs.h \
   sys/pstat.h \
   linux/fiemap.h \
 ])
+AC_CHECK_HEADERS([sys/proc.h], [], [], [
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
+])
 
 AS_IF([test "x$build_dselect" = "xyes"], [
   AC_LANG_PUSH([C++])

+ 3 - 0
debian/changelog

@@ -30,6 +30,9 @@ dpkg (1.18.23) UNRELEASED; urgency=medium
       Proposed by Dieter Adriaenssens <dieter.adriaenssens@gmail.com>.
     - Document dpkg-source --before-build and --after-build in --help output.
     - Document dpkg-buildpackage --ignore-builtin-builddeps in --help output.
+  * Build system:
+    - Check <sys/proc.h> by also including <sys/param.h>, on several BSD
+      systems the header is not self-contained.
 
  -- Guillem Jover <guillem@debian.org>  Wed, 01 Feb 2017 06:28:28 +0100