summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2009-09-24 12:42:50 +0200
committerGuillem Jover <guillem@debian.org>2009-09-24 13:41:51 +0200
commit59168691c0d410f818350ab9d83515aafa4b4591 (patch)
tree0fb16456f4a79d32bdb2adebcb745fe3047b561a
parentef1c0d61cf894cfad4954267c89ffe910995b87f (diff)
downloaddpkg-59168691c0d410f818350ab9d83515aafa4b4591.tar.gz
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.
-rw-r--r--configure.ac1
-rw-r--r--lib/compat/compat.h2
2 files changed, 2 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index d0c3e3d4e..c678c309b 100644
--- a/configure.ac
+++ b/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])
diff --git a/lib/compat/compat.h b/lib/compat/compat.h
index b0f22f93d..3af717d1a 100644
--- a/lib/compat/compat.h
+++ b/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