This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] Fix macro warning on HAVE_PT_CHOWN
- From: Andreas Schwab <schwab at suse dot de>
- To: libc-alpha at sourceware dot org
- Date: Tue, 13 May 2014 17:24:01 +0200
- Subject: [PATCH] Fix macro warning on HAVE_PT_CHOWN
- Authentication-results: sourceware.org; auth=none
Tested with --enable-pt-chown=[yes|no].
Andreas.
* config.h.in (HAVE_PT_CHOWN): Define as 0.
* sysdeps/unix/grantpt.c (grantpt): Check HAVE_PT_CHOWN for value,
not definedness.
---
config.h.in | 2 +-
sysdeps/unix/grantpt.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/config.h.in b/config.h.in
index b6e3623..a9ff1e3 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 410dc50..2cb277c 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;
--
1.9.3
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."