]> git.ipfire.org Git - people/amarx/ipfire-3.x.git/blobdiff - xorg-x11-server/patches/xserver-1.12-Xext-fix-selinux-build-failure.patch
xorg-x11-server: Update to 1.13.2.
[people/amarx/ipfire-3.x.git] / xorg-x11-server / patches / xserver-1.12-Xext-fix-selinux-build-failure.patch
diff --git a/xorg-x11-server/patches/xserver-1.12-Xext-fix-selinux-build-failure.patch b/xorg-x11-server/patches/xserver-1.12-Xext-fix-selinux-build-failure.patch
new file mode 100644 (file)
index 0000000..a48a013
--- /dev/null
@@ -0,0 +1,52 @@
+From 5d16c39108c72b08478b6bd548494d6c675495ee Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Wed, 4 Jan 2012 09:31:51 +1000
+Subject: [PATCH 6/7] Xext: fix selinux build failure
+
+The server builds with -Werror=missing-braces, causing
+
+xselinux_hooks.c: In function 'SELinuxFlaskInit':
+xselinux_hooks.c:851:12: error: missing braces around initializer
+[-Werror=missing-braces]
+xselinux_hooks.c:851:12: error: (near initialization for
+'avc_option.<anonymous>') [-Werror=missing-braces]
+cc1: some warnings being treated as errors
+
+Source is libselinux' libselinux-rhat.patch which changes struct selinux_opt
+from { int, char * } to { int, union { char*, char** }}.
+
+Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+---
+ Xext/xselinux_hooks.c |    2 +-
+ Xext/xselinux_label.c |    2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Xext/xselinux_hooks.c b/Xext/xselinux_hooks.c
+index e9c7e93..0302f2f 100644
+--- a/Xext/xselinux_hooks.c
++++ b/Xext/xselinux_hooks.c
+@@ -851,7 +851,7 @@ SELinuxFlaskReset(void)
+ void
+ SELinuxFlaskInit(void)
+ {
+-    struct selinux_opt avc_option = { AVC_OPT_SETENFORCE, (char *) 0 };
++    struct selinux_opt avc_option = { AVC_OPT_SETENFORCE, { (char *) 0 } };
+     security_context_t ctx;
+     int ret = TRUE;
+diff --git a/Xext/xselinux_label.c b/Xext/xselinux_label.c
+index 2c33d1c..81f2f36 100644
+--- a/Xext/xselinux_label.c
++++ b/Xext/xselinux_label.c
+@@ -361,7 +361,7 @@ SELinuxDefaultClientLabel(void)
+ void
+ SELinuxLabelInit(void)
+ {
+-    struct selinux_opt selabel_option = { SELABEL_OPT_VALIDATE, (char *) 1 };
++    struct selinux_opt selabel_option = { SELABEL_OPT_VALIDATE, { (char *)1 } };
+     label_hnd = selabel_open(SELABEL_CTX_X, &selabel_option, 1);
+     if (!label_hnd)
+-- 
+1.7.10.1
+