1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-09-11 15:08:33 +01:00
nixpkgs/pkgs/development/libraries/glibc/2.17/rpcgen-path.patch

55 lines
1.5 KiB
Diff
Raw Normal View History

2012-12-28 23:49:21 +00:00
diff -ru glibc-2.17-orig/sunrpc/rpc_main.c glibc-2.17/sunrpc/rpc_main.c
--- glibc-2.17-orig/sunrpc/rpc_main.c 2012-12-25 04:02:13.000000000 +0100
+++ glibc-2.17/sunrpc/rpc_main.c 2012-12-29 00:21:04.124698455 +0100
@@ -77,7 +77,7 @@
2012-09-18 17:38:43 +01:00
static const char *svcclosetime = "120";
static int cppDefined; /* explicit path for C preprocessor */
2012-12-28 23:49:21 +00:00
-static const char *CPP = "/lib/cpp";
2012-09-18 17:38:43 +01:00
+static const char *CPP = "cpp";
static const char CPPFLAGS[] = "-C";
static char *pathbuf;
static int cpp_pid;
2012-12-28 23:49:21 +00:00
@@ -106,7 +106,6 @@
2012-09-18 17:38:43 +01:00
static void open_output (const char *infile, const char *outfile);
static void add_warning (void);
static void clear_args (void);
-static void find_cpp (void);
static void open_input (const char *infile, const char *define);
static int check_nettype (const char *name, const char *list_to_check[]);
static void c_output (const char *infile, const char *define,
2012-12-28 23:49:21 +00:00
@@ -318,25 +317,6 @@
2012-09-18 17:38:43 +01:00
argcount = FIXEDARGS;
}
-/* make sure that a CPP exists */
-static void
-find_cpp (void)
-{
- struct stat buf;
-
2012-12-28 23:49:21 +00:00
- 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 ();
2012-09-18 17:38:43 +01:00
- }
2012-12-28 23:49:21 +00:00
-
- /* fall back to system CPP */
- CPP = "cpp";
2012-09-18 17:38:43 +01:00
-}
-
/*
* Open input file with given define for C-preprocessor
*/
2012-12-28 23:49:21 +00:00
@@ -355,7 +335,6 @@
2012-09-18 17:38:43 +01:00
switch (cpp_pid)
{
case 0:
- find_cpp ();
putarg (0, CPP);
putarg (1, CPPFLAGS);
addarg (define);