Prechádzať zdrojové kódy

libcompat: Include getopt module when we need getopt_long

The latter requires the local getopt implementation, so we need to
include it even if the system provides a getopt implementation.
Guillem Jover 10 rokov pred
rodič
commit
7d22e85e63
2 zmenil súbory, kde vykonal 5 pridanie a 0 odobranie
  1. 1 0
      debian/changelog
  2. 4 0
      lib/compat/Makefile.am

+ 1 - 0
debian/changelog

@@ -58,6 +58,7 @@ dpkg (1.18.11) UNRELEASED; urgency=medium
       across systems, for example on AIX.
     - Add <sys/sysmacros.h> on AIX for major() and minor().
     - Add missing <errno.h> in libcompat.
+    - Include libcompat getopt module when we need getopt_long.
   * 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/compat/Makefile.am

@@ -38,6 +38,10 @@ endif
 
 if !HAVE_GETOPT
 libcompat_la_SOURCES += getopt.c getopt.h
+else
+if !HAVE_GETOPT_LONG
+libcompat_la_SOURCES += getopt.c getopt.h
+endif
 endif
 
 if !HAVE_GETOPT_LONG