summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@suse.de>2014-05-13 17:04:27 +0200
committerAndreas Schwab <schwab@suse.de>2014-05-14 09:46:54 +0200
commit73ba67cbc3941c3bcfda31a22a9d0d97ac928f3b (patch)
tree1ff162cf22a3f22dd9fdf948bd58fdb56e94aa46
parent5e7698c6f152c93a73ee4140ad23f7171aa79ce0 (diff)
downloadglibc-73ba67cbc3941c3bcfda31a22a9d0d97ac928f3b.tar.gz
Fix macro warning on HAVE_PT_CHOWN
-rw-r--r--ChangeLog6
-rw-r--r--config.h.in2
-rw-r--r--sysdeps/unix/grantpt.c2
3 files changed, 8 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index e66dafc40d..7d9a8b7eaf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2014-05-14 Andreas Schwab <schwab@suse.de>
+
+ * config.h.in (HAVE_PT_CHOWN): Define as 0.
+ * sysdeps/unix/grantpt.c (grantpt): Check HAVE_PT_CHOWN for value,
+ not definedness.
+
2014-05-14 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_UTIMES):
diff --git a/config.h.in b/config.h.in
index b6e3623d92..a9ff1e3ac1 100644
--- a/config.h.in
+++ b/config.h.in
@@ -251,7 +251,7 @@
#undef HAVE_ARM_PCS_VFP
/* The pt_chown binary is being built and used by grantpt. */
-#undef HAVE_PT_CHOWN
+#define HAVE_PT_CHOWN 0
/* ports/sysdeps/mips/configure.in */
/* Define if using the IEEE 754-2008 NaN encoding on the MIPS target. */
diff --git a/sysdeps/unix/grantpt.c b/sysdeps/unix/grantpt.c
index 410dc50cf9..2cb277cc00 100644
--- a/sysdeps/unix/grantpt.c
+++ b/sysdeps/unix/grantpt.c
@@ -176,7 +176,7 @@ grantpt (int fd)
/* We have to use the helper program if it is available. */
helper:;
-#ifdef HAVE_PT_CHOWN
+#if HAVE_PT_CHOWN
pid_t pid = __fork ();
if (pid == -1)
goto cleanup;