From 105c5977fa7f29f23ecbb405210872f84d1d1d2b Mon Sep 17 00:00:00 2001 From: Steve Conklin Date: Fri, 26 Oct 2007 20:58:38 +0000 Subject: [PATCH] Fixed a problem that was preventing compilation --- mcstrans-0.2.6-max_const.patch | 20 ++++++++++++++++++++ mcstrans.spec | 3 +++ 2 files changed, 23 insertions(+) create mode 100644 mcstrans-0.2.6-max_const.patch diff --git a/mcstrans-0.2.6-max_const.patch b/mcstrans-0.2.6-max_const.patch new file mode 100644 index 0000000..b428356 --- /dev/null +++ b/mcstrans-0.2.6-max_const.patch @@ -0,0 +1,20 @@ +diff -up mcstrans-0.2.6/src/mcstrans.c.spc mcstrans-0.2.6/src/mcstrans.c +--- mcstrans-0.2.6/src/mcstrans.c.spc 2007-09-13 10:05:50.000000000 -0500 ++++ mcstrans-0.2.6/src/mcstrans.c 2007-10-26 11:34:08.000000000 -0500 +@@ -260,8 +260,6 @@ static int get_max_categories() { + return 1023; + } + +-static int max_categories=get_max_categories(); +- + static char *substitute_range(const char *cat) { + char *categories = strdup(cat); + char *ptr; +@@ -270,6 +268,7 @@ static char *substitute_range(const char + char *sub = strdup(""); + int error = 0; + char *tmp = NULL; ++ int max_categories = get_max_categories(); + while (tok) { + if ((r = strchr(tok,'.')) != 0) { + unsigned int begin = atoi(&tok[1]); diff --git a/mcstrans.spec b/mcstrans.spec index 2cbb1b7..804af6d 100644 --- a/mcstrans.spec +++ b/mcstrans.spec @@ -6,6 +6,7 @@ License: GPL Group: System Environment/Daemons Source: http://fedora.redhat.com/projects/%{name}-%{version}.tgz Patch0: mcstrans-0.2.3-init.patch +Patch1: mcstrans-0.2.6-max_const.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: libselinux-devel >= 1.30.3-1 BuildRequires: libcap-devel @@ -32,6 +33,7 @@ from internal representations to user defined representation. %prep %setup -q %patch0 -p1 +%patch1 -p1 -b .spc %build make clean @@ -74,6 +76,7 @@ fi %changelog * Thu Oct 25 2007 Steve Conklin - 0.2.6-2 - Fixed some init script errors +- Fixed a compile problem with max_categories * Thu Sep 13 2007 Dan Walsh 0.2.6-1 - Check for max_categories and error out