53 lines
1.7 KiB
Diff
53 lines
1.7 KiB
Diff
|
From 080b3903ee57a682ac67306d7ff855bbf1dccda3 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] 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 0d4c9ab..943e5cc 100644
|
||
|
--- a/Xext/xselinux_hooks.c
|
||
|
+++ b/Xext/xselinux_hooks.c
|
||
|
@@ -848,7 +848,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 e5929fa..de49f83 100644
|
||
|
--- a/Xext/xselinux_label.c
|
||
|
+++ b/Xext/xselinux_label.c
|
||
|
@@ -354,7 +354,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.7.4
|
||
|
|