]> git.ipfire.org Git - ipfire-3.x.git/blob - xorg-x11-server/patches/xserver-1.12-Xext-fix-selinux-build-failure.patch
git: Update to 2.23.0
[ipfire-3.x.git] / xorg-x11-server / patches / xserver-1.12-Xext-fix-selinux-build-failure.patch
1 From 5d16c39108c72b08478b6bd548494d6c675495ee Mon Sep 17 00:00:00 2001
2 From: Peter Hutterer <peter.hutterer@who-t.net>
3 Date: Wed, 4 Jan 2012 09:31:51 +1000
4 Subject: [PATCH 6/7] Xext: fix selinux build failure
5
6 The server builds with -Werror=missing-braces, causing
7
8 xselinux_hooks.c: In function 'SELinuxFlaskInit':
9 xselinux_hooks.c:851:12: error: missing braces around initializer
10 [-Werror=missing-braces]
11 xselinux_hooks.c:851:12: error: (near initialization for
12 'avc_option.<anonymous>') [-Werror=missing-braces]
13 cc1: some warnings being treated as errors
14
15 Source is libselinux' libselinux-rhat.patch which changes struct selinux_opt
16 from { int, char * } to { int, union { char*, char** }}.
17
18 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
19 ---
20 Xext/xselinux_hooks.c | 2 +-
21 Xext/xselinux_label.c | 2 +-
22 2 files changed, 2 insertions(+), 2 deletions(-)
23
24 diff --git a/Xext/xselinux_hooks.c b/Xext/xselinux_hooks.c
25 index e9c7e93..0302f2f 100644
26 --- a/Xext/xselinux_hooks.c
27 +++ b/Xext/xselinux_hooks.c
28 @@ -851,7 +851,7 @@ SELinuxFlaskReset(void)
29 void
30 SELinuxFlaskInit(void)
31 {
32 - struct selinux_opt avc_option = { AVC_OPT_SETENFORCE, (char *) 0 };
33 + struct selinux_opt avc_option = { AVC_OPT_SETENFORCE, { (char *) 0 } };
34 security_context_t ctx;
35 int ret = TRUE;
36
37 diff --git a/Xext/xselinux_label.c b/Xext/xselinux_label.c
38 index 2c33d1c..81f2f36 100644
39 --- a/Xext/xselinux_label.c
40 +++ b/Xext/xselinux_label.c
41 @@ -361,7 +361,7 @@ SELinuxDefaultClientLabel(void)
42 void
43 SELinuxLabelInit(void)
44 {
45 - struct selinux_opt selabel_option = { SELABEL_OPT_VALIDATE, (char *) 1 };
46 + struct selinux_opt selabel_option = { SELABEL_OPT_VALIDATE, { (char *)1 } };
47
48 label_hnd = selabel_open(SELABEL_CTX_X, &selabel_option, 1);
49 if (!label_hnd)
50 --
51 1.7.10.1
52