Fixed a problem that was preventing compilation

This commit is contained in:
Steve Conklin 2007-10-26 20:58:38 +00:00
parent 0568402099
commit 105c5977fa
2 changed files with 23 additions and 0 deletions

View File

@ -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]);

View File

@ -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 <sconklin@redhat.com> - 0.2.6-2
- Fixed some init script errors
- Fixed a compile problem with max_categories
* Thu Sep 13 2007 Dan Walsh <dwalsh@redhat.com> 0.2.6-1
- Check for max_categories and error out