Selaa lähdekoodia

libdpkg: Add <sys/sysmacros.h> on AIX for major() and minor()

Guillem Jover 10 vuotta sitten
vanhempi
commit
1d4e37d00e
3 muutettua tiedostoa jossa 6 lisäystä ja 0 poistoa
  1. 1 0
      configure.ac
  2. 1 0
      debian/changelog
  3. 4 0
      lib/dpkg/t/c-tarextract.c

+ 1 - 0
configure.ac

@@ -98,6 +98,7 @@ AC_CHECK_HEADERS([\
   locale.h \
   libintl.h \
   kvm.h \
+  sys/sysmacros.h \
   sys/param.h \
   sys/sysctl.h \
   sys/syscall.h \

+ 1 - 0
debian/changelog

@@ -56,6 +56,7 @@ dpkg (1.18.11) UNRELEASED; urgency=medium
     - Use our own dpkg_ar_hdr struct instead of relying on the system
       ar_hdr struct, as the ar format is not standardized and does vary
       across systems, for example on AIX.
+    - Add <sys/sysmacros.h> on AIX for major() and minor().
   * Perl modules:
     - Obsolete Source-Version substvar in Dpkg::Substvars by emitting errors.
     - Rework keyring hooks in Dpkg::Vendor. Deprecate the keyrings hook, and

+ 4 - 0
lib/dpkg/t/c-tarextract.c

@@ -22,6 +22,10 @@
 #include <compat.h>
 
 #include <sys/types.h>
+#if HAVE_SYS_SYSMACROS_H
+#include <sys/sysmacros.h> /* Needed on AIX for major()/minor(). */
+#endif
+
 #include <fcntl.h>
 #include <stdint.h>
 #include <stdio.h>