Build fix - pre-processor typos in rx_lwp.c and rx_pthread.c
[openafs.git] / src / rx / rx_pthread.c
index c780423..5fdfd8d 100644 (file)
@@ -18,8 +18,6 @@
 #include <afsconfig.h>
 #include <afs/param.h>
 
-RCSID
-    ("$Header$");
 
 #include <sys/types.h>
 #include <errno.h>
@@ -33,9 +31,9 @@ RCSID
 # include <net/if.h>
 # include <sys/ioctl.h>
 # include <sys/time.h>
+# include <unistd.h>
 #endif
 #include <sys/stat.h>
-#include "rx_internal.h"
 #include <rx/rx.h>
 #include <rx/rx_globals.h>
 #include <assert.h>
@@ -98,11 +96,11 @@ rxi_InitializeThreadSupport(void)
 static void *
 server_entry(void *argp)
 {
-    void (*server_proc) () = (void (*)())argp;
-    server_proc();
+    void (*server_proc) (void *) = (void (*)(void *))argp;
+    server_proc(NULL);
     dpf(("rx_pthread.c: server_entry: Server proc returned unexpectedly\n"));
     exit(1);
-    return (void *)0;
+    return NULL;
 }
 
 /*
@@ -193,6 +191,7 @@ event_handler(void *argp)
 #endif
        rx_pthread_event_rescheduled = 0;
     }
+    return NULL;
 }
 
 
@@ -273,6 +272,7 @@ rx_ListenerProc(void *argp)
        /* assert(sock != OSI_NULLSOCKET); */
     }
     /* not reached */
+    return NULL;
 }
 
 /* This is the server process request loop. The server process loop
@@ -320,6 +320,7 @@ rx_ServerProc(void * dummy)
        /* assert(newcall != NULL); */
     }
     /* not reached */
+    return NULL;
 }
 
 /*
@@ -439,12 +440,19 @@ rxi_Sendmsg(osi_socket socket, struct msghdr *msg_p, int flags)
 #endif
        dpf(("rxi_sendmsg failed, error %d\n", errno));
        fflush(stdout);
+#ifndef AFS_NT40_ENV
+        if (errno > 0)
+          return -errno;
+#else
+            if (WSAGetLastError() > 0)
+              return -WSAGetLastError();
+#endif
        return -1;
     }
     return 0;
 }
 
-struct rx_ts_info_t * rx_ts_info_init() {
+struct rx_ts_info_t * rx_ts_info_init(void) {
     struct rx_ts_info_t * rx_ts_info;
     rx_ts_info = (rx_ts_info_t *) malloc(sizeof(rx_ts_info_t));
     assert(rx_ts_info != NULL && pthread_setspecific(rx_ts_info_key, rx_ts_info) == 0);