nfs-kernel-server: add a host build for rpcgen with the header file fixes, fix patching of generated files

git-svn-id: svn://svn.openwrt.org/openwrt/packages@25519 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
nbd
2011-02-13 15:21:37 +00:00
parent 781433904d
commit c3faff3e84
4 changed files with 70 additions and 13 deletions

View File

@ -33,15 +33,3 @@
if (ret == 0 && rpcp != NULL)
{
/* First try name. */
--- a/utils/statd/sm_inter_svc.c
+++ b/utils/statd/sm_inter_svc.c
@@ -10,7 +10,9 @@
#include <stdlib.h>
#include <netdb.h>
#include <signal.h>
+#ifndef __UCLIBC__
#include <sys/ttycom.h>
+#endif
#include <memory.h>
#include <sys/socket.h>
#include <netinet/in.h>

View File

@ -0,0 +1,26 @@
--- a/tools/rpcgen/rpc_main.c
+++ b/tools/rpcgen/rpc_main.c
@@ -545,13 +545,6 @@ s_output(int argc, char **argv, char *in
timerflag = 1;
}
-#ifndef linux
- if( !tirpcflag && inetdflag )
- f_print(fout, "#include <sys/ttycom.h>/* TIOCNOTTY */\n");
-#else
- if( !tirpcflag )
- f_print(fout, "#include <sys/ttycom.h>/* TIOCNOTTY */\n");
-#endif
if( Cflag && (inetdflag || pmflag ) ) {
f_print(fout, "#ifdef __cplusplus\n");
f_print(fout, "#include <sysent.h> /* getdtablesize, open */\n");
--- a/tools/rpcgen/rpc_svcout.c
+++ b/tools/rpcgen/rpc_svcout.c
@@ -788,7 +788,6 @@ write_rpc_svc_fg(char *infile, char *sp)
else {
f_print(fout, "%si = open(\"/dev/tty\", 2);\n", sp);
f_print(fout, "%sif (i >= 0) {\n", sp);
- f_print(fout, "%s\t(void) ioctl(i, TIOCNOTTY, (char *)NULL);\n", sp);;
f_print(fout, "%s\t(void) close(i);\n", sp);
f_print(fout, "%s}\n", sp);
}

View File

@ -0,0 +1,10 @@
--- a/tools/rpcgen/rpc_cout.c
+++ b/tools/rpcgen/rpc_cout.c
@@ -38,7 +38,6 @@ static char sccsid[] = "@(#)rpc_cout.c 1
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
-#include <malloc.h>
#include <ctype.h>
#include "rpc_parse.h"
#include "rpc_util.h"