Find cpp in /usr/bin too (#767662)

This commit is contained in:
Jeff Law 2012-02-07 12:03:30 -07:00
parent a8b5679282
commit 7472f9034f
2 changed files with 41 additions and 2 deletions

32
glibc-rh787662.patch Normal file
View File

@ -0,0 +1,32 @@
diff -rup a/sunrpc/rpc_main.c b/sunrpc/rpc_main.c
--- a/sunrpc/rpc_main.c 2012-01-01 05:16:32.000000000 -0700
+++ b/sunrpc/rpc_main.c 2012-02-07 11:06:16.479796121 -0700
@@ -77,6 +77,7 @@ static const char *cmdname;
#define SVR4_CPP "/usr/ccs/lib/cpp"
#define SUNOS_CPP "/lib/cpp"
+#define USR_LIB_CPP "/usr/bin/cpp"
static const char *svcclosetime = "120";
static int cppDefined; /* explicit path for C preprocessor */
@@ -343,12 +344,16 @@ find_cpp (void)
crash ();
}
else
- { /* try the other one */
+ { /* try the other ones */
CPP = SVR4_CPP;
if (stat (CPP, &buf) < 0)
- { /* can't find any cpp */
- fputs (_ ("cannot find any C preprocessor (cpp)\n"), stdout);
- crash ();
+ {
+ CPP = USR_LIB_CPP;
+ if (stat (CPP, &buf) < 0)
+ { /* can't find any cpp */
+ fputs (_ ("cannot find any C preprocessor (cpp)\n"), stdout);
+ crash ();
+ }
}
}
}

View File

@ -2,7 +2,7 @@
%define glibcversion 2.15 %define glibcversion 2.15
%define glibcportsdir glibc-ports-2.15-ad8ae7d %define glibcportsdir glibc-ports-2.15-ad8ae7d
### glibc.spec.in follows: ### glibc.spec.in follows:
%define run_glibc_tests 0 %define run_glibc_tests 1
%define auxarches athlon alphaev6 %define auxarches athlon alphaev6
%define xenarches i686 athlon %define xenarches i686 athlon
%ifarch %{xenarches} %ifarch %{xenarches}
@ -28,7 +28,7 @@
Summary: The GNU libc libraries Summary: The GNU libc libraries
Name: glibc Name: glibc
Version: %{glibcversion} Version: %{glibcversion}
Release: 13%{?dist} Release: 14%{?dist}
# GPLv2+ is used in a bunch of programs, LGPLv2+ is used for libraries. # GPLv2+ is used in a bunch of programs, LGPLv2+ is used for libraries.
# Things that are linked directly into dynamically linked programs # Things that are linked directly into dynamically linked programs
# and shared libraries (e.g. crt files, lib*_nonshared.a) have an additional # and shared libraries (e.g. crt files, lib*_nonshared.a) have an additional
@ -78,6 +78,9 @@ Patch21: %{name}-rh770869.patch
Patch22: %{name}-rh691912.patch Patch22: %{name}-rh691912.patch
# Not necessary to send upstream # Not necessary to send upstream
Patch23: %{name}-rh688948.patch Patch23: %{name}-rh688948.patch
# Given the upstream attitude towards rpc stuff, this will
# almost certainly be rejected.
Patch24: %{name}-rh787662.patch
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -320,6 +323,7 @@ rm -rf %{glibcportsdir}
%patch21 -p1 %patch21 -p1
%patch22 -p1 %patch22 -p1
%patch23 -p1 %patch23 -p1
%patch24 -p1
# A lot of programs still misuse memcpy when they have to use # A lot of programs still misuse memcpy when they have to use
# memmove. The memcpy implementation below is not tolerant at # memmove. The memcpy implementation below is not tolerant at
@ -1172,6 +1176,9 @@ rm -f *.filelist*
%endif %endif
%changelog %changelog
* Tue Feb 7 2012 Jeff Law <law@redhat.com> - 2.15-14
- Find cpp in /usr/bin too (#767662)
* Mon Feb 6 2012 Jeff Law <law@redhat.com> - 2.15-13 * Mon Feb 6 2012 Jeff Law <law@redhat.com> - 2.15-13
- More accurately detect if we're in a chroot (#688948) - More accurately detect if we're in a chroot (#688948)