Browse Source

s-s-d: Define _KMEMUSER for NetBSD

We need to define this macro to be able to get the declarations for the
struct proc and other struct kproc_info members.
Guillem Jover 4 years ago
parent
commit
414903639c
2 changed files with 5 additions and 0 deletions
  1. 2 0
      debian/changelog
  2. 3 0
      utils/start-stop-daemon.c

+ 2 - 0
debian/changelog

@@ -11,6 +11,8 @@ dpkg (1.18.23) UNRELEASED; urgency=medium
     - Use 5-argument kvm_getprocs() call form on OpenBSD in start-stop-daemon.
     - Use correct struct kinfo_proc ruid submember name on NetBSD in
       start-stop-daemon.
+    - Define _KMEMUSER for NetBSD to get declarations for various
+      struct kinfo_proc members in start-stop-daemon.
   * Perl modules:
     - Do not special case EM_SPARC32PLUS for NetBSD in Dpkg::Shlibs::Objdump,
       the code has been fixed in NetBSD as that situation could not happen.

+ 3 - 0
utils/start-stop-daemon.c

@@ -49,6 +49,9 @@
 #  error Unknown architecture - cannot build start-stop-daemon
 #endif
 
+/* NetBSD needs this to expose struct proc. */
+#define _KMEMUSER 1
+
 #ifdef HAVE_SYS_PARAM_H
 #include <sys/param.h>
 #endif