mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-01-23 17:33:26 +08:00
Fix rpc
This commit is contained in:
parent
e282d01fab
commit
bd61accd2a
@ -8,7 +8,7 @@
|
||||
|
||||
pkgname=glibc
|
||||
pkgver=2.15
|
||||
pkgrel=2
|
||||
pkgrel=3
|
||||
_glibcdate=20120419
|
||||
pkgdesc="GNU C Library"
|
||||
arch=('x86_64')
|
||||
@ -31,6 +31,7 @@ source=(http://chakra.sourceforge.net/sources/${pkgname}/${pkgname}-${pkgver}_${
|
||||
glibc-2.14-reexport-rpc-interface.patch
|
||||
glibc-2.14-reinstall-nis-rpc-headers.patch
|
||||
glibc-2.15-fix-res_query-assert.patch
|
||||
glibc-2.15-rpcgen-cpp-path.patch
|
||||
glibc-2.15-lddebug-scopes.patch
|
||||
glibc-2.15-revert-c5a0802a.patch
|
||||
glibc-2.15-scanf.patch
|
||||
@ -65,6 +66,7 @@ md5sums=('c0487f4e83db1b9b30d7989fc47dbead'
|
||||
'c5de2a946215d647c8af5432ec4b0da0'
|
||||
'55febbb72139ac7b65757df085024b83'
|
||||
'684073467137906fb9411f4c7f00db10'
|
||||
'8f26740c248d8b0de68eef8a00f09583'
|
||||
'207483814b5034d9841ad090c75bedf4'
|
||||
'62288103a28f5f779da4ee64621d81d1'
|
||||
'34baaa90a8fcd500adfbe8c609ed81f1'
|
||||
@ -131,6 +133,10 @@ build() {
|
||||
# http://sourceware.org/bugzilla/show_bug.cgi?id=13013
|
||||
patch -p1 -i ${srcdir}/glibc-2.15-fix-res_query-assert.patch
|
||||
|
||||
# prevent need for /lib/cpp symlink
|
||||
# http://sourceware.org/git/?p=glibc.git;a=commit;h=bf9b740a
|
||||
patch -p1 -i ${srcdir}/glibc-2.15-rpcgen-cpp-path.patch
|
||||
|
||||
# propriety nvidia crash - https://bugzilla.redhat.com/show_bug.cgi?id=737223
|
||||
# http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=0c95ab64 (fedora branch)
|
||||
patch -p1 -i ${srcdir}/glibc-2.15-lddebug-scopes.patch
|
||||
@ -227,6 +233,7 @@ build() {
|
||||
--libdir=/usr/lib --libexecdir=/usr/lib \
|
||||
--with-headers=/usr/include \
|
||||
--enable-add-ons=nptl,libidn \
|
||||
--enable-obsolete-rpc \
|
||||
--enable-kernel=2.6.32 \
|
||||
--with-tls --with-__thread \
|
||||
--enable-bind-now --without-gd \
|
||||
|
68
glibc/glibc-2.15-rpcgen-cpp-path.patch
Normal file
68
glibc/glibc-2.15-rpcgen-cpp-path.patch
Normal file
@ -0,0 +1,68 @@
|
||||
diff --git a/sunrpc/rpc_main.c b/sunrpc/rpc_main.c
|
||||
index 06d951a..2103b10 100644
|
||||
--- a/sunrpc/rpc_main.c
|
||||
+++ b/sunrpc/rpc_main.c
|
||||
@@ -75,12 +75,9 @@ struct commandline
|
||||
|
||||
static const char *cmdname;
|
||||
|
||||
-#define SVR4_CPP "/usr/ccs/lib/cpp"
|
||||
-#define SUNOS_CPP "/lib/cpp"
|
||||
-
|
||||
static const char *svcclosetime = "120";
|
||||
static int cppDefined; /* explicit path for C preprocessor */
|
||||
-static const char *CPP = SUNOS_CPP;
|
||||
+static const char *CPP = "/lib/cpp";
|
||||
static const char CPPFLAGS[] = "-C";
|
||||
static char *pathbuf;
|
||||
static int cpp_pid;
|
||||
@@ -327,23 +324,17 @@ find_cpp (void)
|
||||
{
|
||||
struct stat buf;
|
||||
|
||||
- if (stat (CPP, &buf) < 0)
|
||||
- { /* /lib/cpp or explicit cpp does not exist */
|
||||
- if (cppDefined)
|
||||
- {
|
||||
- fprintf (stderr, _ ("cannot find C preprocessor: %s \n"), CPP);
|
||||
- crash ();
|
||||
- }
|
||||
- else
|
||||
- { /* try the other one */
|
||||
- CPP = SVR4_CPP;
|
||||
- if (stat (CPP, &buf) < 0)
|
||||
- { /* can't find any cpp */
|
||||
- fputs (_ ("cannot find any C preprocessor (cpp)\n"), stdout);
|
||||
- crash ();
|
||||
- }
|
||||
- }
|
||||
+ if (stat (CPP, &buf) == 0)
|
||||
+ return;
|
||||
+
|
||||
+ if (cppDefined) /* user specified cpp but it does not exist */
|
||||
+ {
|
||||
+ fprintf (stderr, _ ("cannot find C preprocessor: %s\n"), CPP);
|
||||
+ crash ();
|
||||
}
|
||||
+
|
||||
+ /* fall back to system CPP */
|
||||
+ CPP = "cpp";
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -374,8 +365,13 @@ open_input (const char *infile, const char *define)
|
||||
close (1);
|
||||
dup2 (pd[1], 1);
|
||||
close (pd[0]);
|
||||
- execv (arglist[0], (char **) arglist);
|
||||
- perror ("execv");
|
||||
+ execvp (arglist[0], (char **) arglist);
|
||||
+ if (errno == ENOENT)
|
||||
+ {
|
||||
+ fprintf (stderr, _ ("cannot find C preprocessor: %s\n"), CPP);
|
||||
+ exit (1);
|
||||
+ }
|
||||
+ perror ("execvp");
|
||||
exit (1);
|
||||
case -1:
|
||||
perror ("fork");
|
1
glibc/glibc.conf
Normal file
1
glibc/glibc.conf
Normal file
@ -0,0 +1 @@
|
||||
/lib
|
Loading…
Reference in New Issue
Block a user