--- orig/Makefile.in	2004-08-13 07:18:58
+++ Makefile.in	2004-09-23 06:22:00
@@ -41,7 +41,7 @@ popt_OBJS=popt/findme.o  popt/popt.o  po
 	popt/popthelp.o popt/poptparse.o
 OBJS=$(OBJS1) $(OBJS2) $(OBJS3) $(DAEMON_OBJ) $(LIBOBJ) $(ZLIBOBJ) @BUILD_POPT@
 
-TLS_OBJ = tls.o syscall.o lib/permstring.o
+TLS_OBJ = tls.o syscall.o lib/compat.o lib/permstring.o
 
 # Programs we must have to run the test cases
 CHECK_PROGS = rsync$(EXEEXT) tls$(EXEEXT) getgroups$(EXEEXT) getfsdev$(EXEEXT) \
@@ -83,7 +83,7 @@ getgroups$(EXEEXT): getgroups.o
 getfsdev$(EXEEXT): getfsdev.o
 	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ getfsdev.o $(LIBS)
 
-TRIMSLASH_OBJ = trimslash.o syscall.o
+TRIMSLASH_OBJ = trimslash.o syscall.o lib/compat.o
 trimslash$(EXEEXT): $(TRIMSLASH_OBJ)
 	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(TRIMSLASH_OBJ) $(LIBS)
 
--- orig/syscall.c	2004-08-02 21:56:59
+++ syscall.c	2004-09-23 05:46:46
@@ -26,6 +26,10 @@
 
 #include "rsync.h"
 
+#if HAVE_SYS_UN_H
+#include <sys/un.h>
+#endif
+
 extern int dry_run;
 extern int read_only;
 extern int list_only;
@@ -76,6 +80,29 @@ int do_mknod(char *pathname, mode_t mode
 {
 	if (dry_run) return 0;
 	RETURN_ERROR_IF_RO_OR_LO;
+# if HAVE_MKFIFO
+	if (S_ISFIFO(mode))
+		return mkfifo(pathname, mode);
+# endif
+# if HAVE_SYS_UN_H
+	if (S_ISSOCK(mode)) {
+		int sock;
+		struct sockaddr_un saddr;
+		unsigned int len;
+
+		saddr.sun_family = AF_UNIX;
+		len = strlcpy(saddr.sun_path, pathname, sizeof saddr.sun_path);
+		saddr.sun_len = len >= sizeof saddr.sun_path
+			      ? sizeof saddr.sun_path : len + 1;
+
+		if ((sock = socket(PF_UNIX, SOCK_STREAM, 0)) < 0
+		    || (unlink(pathname) < 0 && errno != ENOENT)
+		    || (bind(sock, (struct sockaddr*)&saddr, sizeof saddr)) < 0)
+			return -1;
+		close(sock);
+		return do_chmod(pathname, mode);
+	}
+# endif
 	return mknod(pathname, mode, dev);
 }
 #endif
