--- server/os/access.c.orig	2009-09-30 21:16:03.000000000 +0200
+++ server/os/access.c	2009-09-30 21:34:35.000000000 +0200
@@ -245,9 +245,9 @@
 /* SVR4, ISC, linux use this if SIOCGIFCONF fails */
 #ifdef USE_FALLBACK_DEFINESELF
 static
-FallbackDefineSelf(fd)
+int FallbackDefineSelf(fd)
 #else
-DefineSelf(fd)
+int DefineSelf(fd)
 #endif
 int fd;
 {
@@ -300,6 +300,7 @@
         }
     }
 #endif /* !TCPCONN && !UNIXCONN */
+    return 0;
 }
 
 #endif
@@ -315,7 +316,7 @@
 /* Define this host for access control.  Find all the hosts the OS knows about 
  * for this fd and add them to the selfhosts list.
  */
-DefineSelf(fd)
+void DefineSelf(fd)
 int fd;
 {
     char buf[2048], *cp, *cplim;
@@ -398,7 +399,7 @@
 #else /* _MINIX */
 /* Define this host for access control.
  */
-DefineSelf(fd)
+void DefineSelf(fd)
 int fd;
 {
     int len;
@@ -435,7 +436,7 @@
 #endif /* AMOEBA */
 
 
-AddLocalHosts()
+void AddLocalHosts()
 {
     HOST *self;
 
@@ -444,7 +445,7 @@
 }
 
 /* Reset access control list to initial hosts */
-ResetHosts(display)
+void ResetHosts(display)
 char *display;
 {
     HOST *host;
--- server/os/auth.c.orig	2009-09-30 21:18:30.000000000 +0200
+++ server/os/auth.c	2009-09-30 21:22:34.000000000 +0200
@@ -59,7 +59,7 @@
 
 extern int MitAddCookie();
 extern AuID MitCheckCookie();
-extern int MitResetCookie();
+extern void MitResetCookie();
 extern AuID MitToID();
 extern int MitFromID(), MitRemoveCookie();
 
@@ -83,7 +83,7 @@
 static int AuthorizationIndex = 0;
 static Bool ShouldLoadAuth = TRUE;
 
-InitAuthorization(file_name)
+void InitAuthorization(file_name)
 char *file_name;
 {
     authorization_file = file_name;
@@ -148,7 +148,7 @@
     return (AuID) ~ 0L;
 }
 
-ResetAuthorization()
+void ResetAuthorization()
 {
     int i;
 
--- server/os/connection.c.orig	2009-09-30 21:19:12.000000000 +0200
+++ server/os/connection.c	2009-09-30 21:20:39.000000000 +0200
@@ -1713,7 +1713,7 @@
 }
 
 
-AddEnabledDevice(fd)
+void AddEnabledDevice(fd)
 int fd;
 {
     BITSET(EnabledDevices, fd);
@@ -1721,7 +1721,7 @@
 }
 
 
-RemoveEnabledDevice(fd)
+void RemoveEnabledDevice(fd)
 int fd;
 {
     BITCLEAR(EnabledDevices, fd);
@@ -1738,7 +1738,7 @@
  *    This routine is "undone" by ListenToAllClients()
  *****************/
 
-OnlyListenToOneClient(client)
+void OnlyListenToOneClient(client)
 ClientPtr client;
 {
     OsCommPtr oc = (OsCommPtr) client->osPrivate;
@@ -1768,7 +1768,7 @@
  *    Undoes OnlyListentToOneClient()
  ****************/
 
-ListenToAllClients()
+void ListenToAllClients()
 {
     if (GrabInProgress) {
         ORBITS(AllSockets, AllSockets, SavedAllSockets);
@@ -1780,7 +1780,7 @@
 
 /* make client impervious to grabs; assume only executing client calls this */
 
-MakeClientGrabImpervious(client)
+void MakeClientGrabImpervious(client)
 ClientPtr client;
 {
     OsCommPtr oc = (OsCommPtr) client->osPrivate;
@@ -1791,7 +1791,7 @@
 
 /* make client pervious to grabs; assume only executing client calls this */
 
-MakeClientGrabPervious(client)
+void MakeClientGrabPervious(client)
 ClientPtr client;
 {
     OsCommPtr oc = (OsCommPtr) client->osPrivate;
--- server/os/io.c.orig	2009-09-30 21:21:13.000000000 +0200
+++ server/os/io.c	2009-09-30 21:21:22.000000000 +0200
@@ -370,7 +370,7 @@
  *
  **********************/
 
-ResetCurrentRequest(client)
+void ResetCurrentRequest(client)
 ClientPtr client;
 {
     OsCommPtr oc = (OsCommPtr) client->osPrivate;
--- server/os/mitauth.c.orig	2009-09-30 21:21:31.000000000 +0200
+++ server/os/mitauth.c	2009-09-30 21:21:51.000000000 +0200
@@ -91,7 +91,7 @@
     return (AuID) - 1;
 }
 
-int
+void
 MitResetCookie()
 {
     struct auth *auth, *next;
--- server/dia/gram.y.orig	2009-09-30 21:20:49.000000000 +0200
+++ server/dia/gram.y	2009-09-30 21:21:04.000000000 +0200
@@ -167,7 +167,7 @@
 
 %%
 
-RemoveDQuote(str)
+void RemoveDQuote(str)
 char *str;
 {
     char *i, *o;
--- server/dda/voxware/auvoxware.c.orig	2009-09-30 21:09:45.000000000 +0200
+++ server/dda/voxware/auvoxware.c	2009-09-30 21:10:40.000000000 +0200
@@ -131,6 +131,8 @@
  *   [chris]
  */
 
+#include <unistd.h>
+#include <sys/socket.h>
 #include <stdio.h>
 #include <stdlib.h>
 #ifndef SVR4
--- server/dda/voxware/config.c.orig	2009-09-30 21:10:54.000000000 +0200
+++ server/dda/voxware/config.c	2009-09-30 21:11:18.000000000 +0200
@@ -4,6 +4,9 @@
  *
  */
 
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
 #include <fcntl.h>
 #include "nasconf.h"
 #include "config.h"
--- clients/audio/auwave/auwave.c.orig	2009-09-30 21:15:42.000000000 +0200
+++ clients/audio/auwave/auwave.c	2009-09-30 21:15:51.000000000 +0200
@@ -400,7 +400,7 @@
 
     globals = g;
     g->top = XtVaAppInitialize(&appContext, APP_CLASS, NULL, ZERO,
-			       &argc, argv, defaultResources, NULL, 0);
+			       &argc, argv, defaultResources, NULL, NULL);
     XtAppAddActions(appContext, actions, XtNumber(actions));
 
     if (argc == 3)
--- clients/audio/autool/audiotool.c.orig	2009-09-30 21:14:11.000000000 +0200
+++ clients/audio/autool/audiotool.c	2009-09-30 21:14:21.000000000 +0200
@@ -464,7 +464,7 @@
 
     globals->topLevel = XtVaAppInitialize(&appContext, APP_CLASS, NULL, ZERO,
 					  &argc, argv, defaultResources,
-					  NULL, 0);
+					  NULL, NULL);
 
     XtVaSetValues(globals->topLevel, XtNinput, True, NULL);
 
--- clients/audio/auedit/auedit.c.orig	2009-09-30 21:11:29.000000000 +0200
+++ clients/audio/auedit/auedit.c	2009-09-30 21:14:48.000000000 +0200
@@ -1250,7 +1250,11 @@
     p = g->data + left * g->numTracks;
 
     while (numSamples--)
-	*p++ = (*p + *data++) / 2;
+    {
+        *p = (*p + *data) / 2;
+        p++;
+        data++;
+    }
 
     if (newValues)
 	XtVaSetValues(g->graph, XtNdata, g->data, XtNnumSamples, g->numSamples,
@@ -2494,7 +2498,7 @@
     g = globals = &globalData;
     r = &g->recordDialog;
     g->top = XtVaAppInitialize(&appContext, APP_CLASS, NULL, ZERO,
-			       &argc, argv, defaultResources, NULL, 0);
+			       &argc, argv, defaultResources, NULL, NULL);
     XtAppAddActions(appContext, actions, XtNumber(actions));
 
     while (--argc)
--- clients/audio/audemo/audemo.c.orig	2009-09-30 21:12:31.000000000 +0200
+++ clients/audio/audemo/audemo.c	2009-09-30 21:14:04.000000000 +0200
@@ -1641,7 +1641,7 @@
 
     globals->topLevel = XtVaAppInitialize(&appContext, APP_CLASS, NULL, ZERO,
 					  &argc, argv, defaultResources,
-					  NULL, 0);
+					  NULL, NULL);
 
     globals->volume = DEFAULT_VOLUME;
     globals->numFiles = 0;
--- clients/audio/examples/recordBucket.c.orig	2009-09-30 21:22:43.000000000 +0200
+++ clients/audio/examples/recordBucket.c	2009-09-30 21:22:59.000000000 +0200
@@ -76,4 +76,5 @@
 
     printf("Press return to quit\n");
     getchar();
+    return 0;
 }
--- clients/audio/aupanel/aupanel.c.orig	2009-09-30 21:15:05.000000000 +0200
+++ clients/audio/aupanel/aupanel.c	2009-09-30 21:15:15.000000000 +0200
@@ -510,7 +510,7 @@
     char           *initialDeviceName = NULL;
 
     g->top = XtVaAppInitialize(&appContext, APP_CLASS, NULL, ZERO,
-			       &argc, argv, defaultResources, NULL, 0);
+			       &argc, argv, defaultResources, NULL, NULL);
 
     g->queryInterval = DEFAULT_QUERY_INTERVAL;
 
--- clients/audio/auphone/auphone.c.orig	2009-09-30 21:15:23.000000000 +0200
+++ clients/audio/auphone/auphone.c	2009-09-30 21:15:34.000000000 +0200
@@ -1151,7 +1151,7 @@
     double          atof();
 
     g->top = XtVaAppInitialize(&g->appContext, APP_CLASS, NULL, ZERO,
-			       &argc, argv, defaultResources, NULL, 0);
+			       &argc, argv, defaultResources, NULL, NULL);
     XtAppAddActions(g->appContext, actions, XtNumber(actions));
 
     g->dpy = XtDisplay(g->top);
--- clients/audio/auconvert/auconvert.c.orig	2009-09-30 21:17:49.000000000 +0200
+++ clients/audio/auconvert/auconvert.c	2009-09-30 21:18:24.000000000 +0200
@@ -121,6 +121,7 @@
 	    return dataFormats[i].value;
 
     usage();
+    return -1;
 }
 
 static int
