* [PATCH] selinux: fix 'defined but not used' warning
@ 2008-10-02 16:29 Alan Jenkins
2008-10-02 16:56 ` Kay Sievers
0 siblings, 1 reply; 2+ messages in thread
From: Alan Jenkins @ 2008-10-02 16:29 UTC (permalink / raw)
To: linux-hotplug
selinux is initialized lazily, so if selinux is disabled then selinux_init will never be called.
This lets udev compile with -Werror again.
Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
diff --git a/udev/lib/libudev.c b/udev/lib/libudev.c
index c2c5025..16cf860 100644
--- a/udev/lib/libudev.c
+++ b/udev/lib/libudev.c
@@ -72,9 +72,9 @@ static void log_stderr(struct udev *udev,
vfprintf(stderr, format, args);
}
+#ifdef USE_SELINUX
static void selinux_init(struct udev *udev)
{
-#ifdef USE_SELINUX
/*
* record the present security context, for file-creation
* restoration creation purposes.
@@ -89,8 +89,8 @@ static void selinux_init(struct udev *udev)
}
}
udev->selinux_initialized = 1;
-#endif
}
+#endif
void *udev_get_userdata(struct udev *udev)
{
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-10-02 16:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-02 16:29 [PATCH] selinux: fix 'defined but not used' warning Alan Jenkins
2008-10-02 16:56 ` Kay Sievers
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.