Blame SOURCES/xserver-1.12-Xext-fix-selinux-build-failure.patch

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