Browse Source

libcompat: Define WCOREDUMP only if the system does not have it

Due to <compat.h> being included first, WCOREDUMP was being defined
always to the dummy version.
Guillem Jover 17 years ago
parent
commit
59168691c0
2 changed files with 2 additions and 1 deletions
  1. 1 0
      configure.ac
  2. 1 1
      lib/compat/compat.h

+ 1 - 0
configure.ac

@@ -95,6 +95,7 @@ DPKG_C_ATTRIBUTE
 
 # Checks for library functions.
 DPKG_FUNC_VA_COPY
+DPKG_CHECK_DECL([WCOREDUMP], [sys/wait.h])
 DPKG_CHECK_COMPAT_FUNCS([getopt getopt_long obstack_free \
                          vsnprintf snprintf strnlen strerror strsignal \
                          scandir alphasort unsetenv])

+ 1 - 1
lib/compat/compat.h

@@ -35,7 +35,7 @@ extern "C" {
  * Define WCOREDUMP if we don't have it already, coredumps won't be
  * detected, though.
  */
-#ifndef WCOREDUMP
+#ifndef HAVE_WCOREDUMP
 #define WCOREDUMP(x) 0
 #endif