diff mbox

Avoid warnings for unused results in nscd/connections.c

Message ID m56n27$lv4$1@ger.gmane.org
State Committed
Headers show

Commit Message

Stefan Liebler Nov. 27, 2014, 8:23 a.m. UTC
Hi,

Building glibc fails at least on s390/power with:
connections.c: In function ‘restart’:
connections.c:1467:4: error: implicit declaration of function 
‘ignore_value’ [-Werror=implicit-function-declaration]
     ignore_value (setuid (server_uid));
     ^
cc1: some warnings being treated as errors

Including libc-internal.h fixes the build failure.

Bye
Stefan

---
2014-11-27  Stefan Liebler  <stli@linux.vnet.ibm.com>

	* nscd/connections.c: Include libc-internal.h
	  because of macro usage ignore_value.

Comments

Patchwork Bot Nov. 27, 2014, 9:06 a.m. UTC | #1
On 27 November 2014 at 13:53, Stefan Liebler <stli@linux.vnet.ibm.com> wrote:
> Building glibc fails at least on s390/power with:
> connections.c: In function ‘restart’:
> connections.c:1467:4: error: implicit declaration of function ‘ignore_value’
> [-Werror=implicit-function-declaration]
>     ignore_value (setuid (server_uid));
>     ^
> cc1: some warnings being treated as errors
>
> Including libc-internal.h fixes the build failure.
>
> Bye
> Stefan
>
> ---
> 2014-11-27  Stefan Liebler  <stli@linux.vnet.ibm.com>
>
>         * nscd/connections.c: Include libc-internal.h
>           because of macro usage ignore_value.

libc-internal.h got included indirectly on x86_64 (via
sysdeps/x86_64/tls.h), which is why it worked there and not on other
architectures.  This fix is correct, please commit it.

Siddhesh
diff mbox

Patch

diff --git a/nscd/connections.c b/nscd/connections.c
index 1631212..a6b9808 100644
--- a/nscd/connections.c
+++ b/nscd/connections.c
@@ -59,6 +59,7 @@ 
 #include <resolv/resolv.h>
 
 #include <kernel-features.h>
+#include <libc-internal.h>
 
 
 /* Support to run nscd as an unprivileged user */