[dpkg] 08/28: libdpkg: Include <sys/sysmacros.h> for makedev()

Mattia Rizzolo mattia at debian.org
Mon Jan 22 17:11:23 UTC 2018


This is an automated email from the git hooks/post-receive script.

mattia pushed a commit to branch master
in repository dpkg.

commit bae5051ec6219be508b46bab785cddf1f04904f0
Author: Guillem Jover <guillem at debian.org>
Date:   Sat Jan 13 02:35:24 2018 +0100

    libdpkg: Include <sys/sysmacros.h> for makedev()
    
    The glibc implementation provides this macro in <sys/sysmacros.h> and
    optionally the BSD variants in <sys/types.h>, although the latter are
    being deprecated and emit a warning with newer glibc. Conditionally
    include <sys/sysmacros.h> to prepare for the future removal from glibc.
---
 debian/changelog | 1 +
 lib/dpkg/tarfn.c | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index ffce9aa..2526bac 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -12,6 +12,7 @@ dpkg (1.19.1) UNRELEASED; urgency=medium
   * Setup and check rootcommand in dpkg-buildpackage only if it is going to
     be needed. Reported by Niels Thykier <niels at thykier.net>.
   * Add color support to dpkg-maintscript-helper (a shell script).
+  * Fix warning by including <sys/sysmacros.h> for makedev() in libdpkg.
   * Perl modules:
     - Check that $tarname is defined before use in Dpkg::Source::Package::V1.
       Thanks to Christoph Biedl <debian.axhn at manchmal.in-ulm.de>.
diff --git a/lib/dpkg/tarfn.c b/lib/dpkg/tarfn.c
index 27952f9..3ad5315 100644
--- a/lib/dpkg/tarfn.c
+++ b/lib/dpkg/tarfn.c
@@ -22,6 +22,9 @@
 #include <config.h>
 #include <compat.h>
 
+#if HAVE_SYS_SYSMACROS_H
+#include <sys/sysmacros.h>
+#endif
 #include <sys/stat.h>
 
 #include <errno.h>

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/dpkg.git



More information about the Reproducible-commits mailing list