All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] policycoreutils: newrole: add missing defined in #if
@ 2016-01-19 16:18 Nicolas Iooss
  2016-02-01 14:14 ` Steve Lawrence
  0 siblings, 1 reply; 2+ messages in thread
From: Nicolas Iooss @ 2016-01-19 16:18 UTC (permalink / raw)
  To: selinux

When building newrole with gcc 5.3.0 and some warning flags, the
compiler reports:

  newrole.c:77:33: error: "NAMESPACE_PRIV" is not defined [-Werror=undef]
  #if defined(AUDIT_LOG_PRIV) || (NAMESPACE_PRIV)
                                  ^

Indeed, "defined" is missing here.  This nevertheless worked so far
because when NAMESPACE_PRIV was selected in the Makefile, newrole.c was
compiled with "-DNAMESPACE_PRIV", which defined NAMESPACE_PRIV to 1.

Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
---
 policycoreutils/newrole/newrole.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/policycoreutils/newrole/newrole.c b/policycoreutils/newrole/newrole.c
index 65a945d3d3f3..c6544eed07b9 100644
--- a/policycoreutils/newrole/newrole.c
+++ b/policycoreutils/newrole/newrole.c
@@ -74,7 +74,7 @@
 #ifdef USE_AUDIT
 #include <libaudit.h>
 #endif
-#if defined(AUDIT_LOG_PRIV) || (NAMESPACE_PRIV)
+#if defined(AUDIT_LOG_PRIV) || defined(NAMESPACE_PRIV)
 #include <sys/prctl.h>
 #include <cap-ng.h>
 #endif
-- 
2.7.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-02-01 14:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-19 16:18 [PATCH] policycoreutils: newrole: add missing defined in #if Nicolas Iooss
2016-02-01 14:14 ` Steve Lawrence

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.