summaryrefslogtreecommitdiff
path: root/net/rmsg/files/patch-server.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/rmsg/files/patch-server.c')
-rw-r--r--net/rmsg/files/patch-server.c63
1 files changed, 50 insertions, 13 deletions
diff --git a/net/rmsg/files/patch-server.c b/net/rmsg/files/patch-server.c
index 9d17c6e74af5..afc9a3cb814e 100644
--- a/net/rmsg/files/patch-server.c
+++ b/net/rmsg/files/patch-server.c
@@ -1,6 +1,31 @@
---- server.c Tue Jun 4 21:40:19 2002
-+++ server.c Tue Jun 4 21:42:56 2002
-@@ -54,7 +54,6 @@
+--- server.c 1993-06-26 17:23:23.000000000 -0400
++++ server.c 2013-04-23 17:13:15.000000000 -0400
+@@ -24,7 +24,11 @@
+
+ #define SERVER
+
++#include <libgen.h>
+ #include <stdio.h>
++#include <stdlib.h>
++#include <sys/param.h>
++#include <unistd.h>
+ #if defined(SVR4)
+ # include <netinet/in.h>
+ #endif /* SVR4 */
+@@ -39,11 +43,7 @@
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <sys/file.h>
+-#if defined(SVR4)
+-# include <string.h>
+-#else
+-# include <strings.h>
+-#endif /* SVR4 */
++#include <string.h>
+ #include <sys/ioctl.h>
+ #ifndef USG5
+ #include <sys/wait.h>
+@@ -54,19 +54,12 @@
#endif /* USG5 || SVR4 */
#include <sys/param.h>
@@ -8,16 +33,21 @@
#include <sys/types.h>
#include <ctype.h>
-@@ -66,7 +65,7 @@
- #else
- char *malloc();
- #endif
+-int xdr_rmsg(), smsg();
++static void smsg(struct svc_req *, SVCXPRT *);
+ int tty_write(), dowrite();
+-char *basename(), *parseheader();
+-#ifdef SUNOS
+-void *malloc();
+-#else
+-char *malloc();
+-#endif
-long time();
-+time_t time();
++char *parseheader();
uid_t getuid();
char *progname;
int debug = 0;
-@@ -99,6 +98,9 @@
+@@ -99,6 +93,9 @@
}
if (! strcmp (basename (progname), "rmsgd")) {
@@ -27,7 +57,7 @@
if (fork()) _exit(0); /* make myself a daemon */
#ifdef BSD
fd = open("/dev/tty", O_RDWR); /* disconnect from control tty */
-@@ -109,10 +111,11 @@
+@@ -109,10 +106,11 @@
#else
(void) setpgrp ();
#endif
@@ -36,11 +66,18 @@
else {
- (void) fprintf (stderr, "Starting from inetd not yet supported, rename me ase rmsgd and start\nfrom /etc/rc\n");
-+ (void) fprintf (stderr, "Starting from inetd not yet supported, rename me ase rmsgd and start\nfrom /etc/rc.local\n");
++ (void) fprintf (stderr, "Starting from inetd not yet supported, rename me as rmsgd and start\nfrom /etc/rc.local\n");
}
if (argc > 1)
-@@ -142,7 +145,7 @@
+@@ -136,13 +134,14 @@
+ exit(-3);
+ }
+
++void
+ smsg(rqstp, transp)
+ struct svc_req *rqstp;
+ SVCXPRT *transp;
{
int child, pid, fd;
unsigned int retval = 0;
@@ -49,7 +86,7 @@
int status;
#else
union wait status;
-@@ -198,6 +201,9 @@
+@@ -198,6 +197,9 @@
#if defined(HPUX) || defined(SVR4)
if (status & 0xff) retval = -1;
else retval = ((status & 0xffff) >> 8);