xserver-1.12-Xext-fix-selinux-build-failure.patch: fix build error
triggered by Red Hat-specific patch to libselinux
This commit is contained in:
parent
9aad602913
commit
afc2c6e766
@ -48,7 +48,7 @@
|
||||
Summary: X.Org X11 X server
|
||||
Name: xorg-x11-server
|
||||
Version: 1.11.99.901
|
||||
Release: 1%{?gitdate:.%{gitdate}}%{dist}
|
||||
Release: 2%{?gitdate:.%{gitdate}}%{dist}
|
||||
URL: http://www.x.org
|
||||
License: MIT
|
||||
Group: User Interface/X
|
||||
@ -101,6 +101,10 @@ Patch7007: xserver-1.10.99.1-test.patch
|
||||
# always install xaa headers even though we don't build the module
|
||||
Patch7012: xserver-1.12-xaa-sdk-headers.patch
|
||||
|
||||
# Fix libselinux-triggered build error
|
||||
# RedHat/Fedora-specific patch
|
||||
Patch7013: xserver-1.12-Xext-fix-selinux-build-failure.patch
|
||||
|
||||
%define moduledir %{_libdir}/xorg/modules
|
||||
%define drimoduledir %{_libdir}/dri
|
||||
%define sdkdir %{_includedir}/xorg
|
||||
@ -556,6 +560,10 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%{xserver_source_dir}
|
||||
|
||||
%changelog
|
||||
* Wed Jan 04 2012 Peter Hutterer <peter.hutterer@redhat.com> 1.11.99.901-2.20120103
|
||||
- xserver-1.12-Xext-fix-selinux-build-failure.patch: fix build error
|
||||
triggered by Red Hat-specific patch to libselinux
|
||||
|
||||
* Tue Jan 03 2012 Peter Hutterer <peter.hutterer@redhat.com> 1.11.99.901-1.20120103
|
||||
- Git snapshot 98cde254acb9b98337ddecf64c138d38c14ec2bf
|
||||
- xserver-1.11.99-optionstr.patch: drop
|
||||
|
52
xserver-1.12-Xext-fix-selinux-build-failure.patch
Normal file
52
xserver-1.12-Xext-fix-selinux-build-failure.patch
Normal file
@ -0,0 +1,52 @@
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user