X-Git-Url: https://mattmccutchen.net/rsync/rsync-patches.git/blobdiff_plain/13bed3ddd0403dc8941696ca63d3e17a1d8676c3..9668a39c888edb2391f80624c2fd9e87128c3e37:/tru64.diff diff --git a/tru64.diff b/tru64.diff index 728328c..bd6d6e4 100644 --- a/tru64.diff +++ b/tru64.diff @@ -1,10 +1,16 @@ This is an adapted version of the original by Zoong Pham. ---- orig/lib/getaddrinfo.c 2004-03-16 01:26:36 -+++ lib/getaddrinfo.c 2004-06-18 17:38:35 -@@ -41,6 +41,20 @@ - - #include +To use this patch, run these commands for a successful build: + + patch -p1 - #endif +--- old/syscall.c ++++ new/syscall.c +@@ -23,6 +23,7 @@ + #include "rsync.h" -+#ifdef HAVE_SYS_UN_H + #if !defined MKNOD_CREATES_SOCKETS && defined HAVE_SYS_UN_H +#define _SOCKADDR_LEN -+#include -+#endif -+ - #ifdef HAVE_STRING_H - #include - #endif ---- orig/syscall.c 2004-02-18 22:33:21 -+++ syscall.c 2004-06-18 17:38:35 -@@ -76,6 +76,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; -+ int len = strlen(pathname) + 1; /* include null */ -+ -+ saddr.sun_family = AF_UNIX; -+ strncpy(saddr.sun_path, pathname, sizeof saddr.sun_path); -+ saddr.sun_len = len > sizeof saddr.sun_path ? sizeof saddr.sun_path: len; -+ -+ if ((sock = socket(PF_UNIX, SOCK_STREAM, 0)) < 0) -+ return -1; -+ unlink(pathname); -+ if ((bind(sock, (struct sockaddr*)&saddr, sizeof saddr)) < 0) -+ return -1; -+ close(sock); -+ return do_chmod(pathname, mode); -+ } -+# endif - return mknod(pathname, mode, dev); - } + #include #endif +