3 On Thu, Mar 21, 2002 at 03:15:39PM -0500, Eckert, Robert D wrote:
4 > Greetings, here is the output of the 'configure' step and
5 > the compile step (using the Compaq cc compiler that comes
6 > with Tru64 V5.1A. The configure reported success and most of
7 > the compile steps cam through error/warning free except for
8 > the one that stumbled. Can someone help me out here? I am willing
9 > to provide a binary for Tru64 V5.1A if we can swat this bug.
11 I had the same problem. I managed to have rsync compiled OK on my
12 Tru64 5.1 box with helps from couple of people from this list.
13 Try with the patch I attach here.
14 I am not a C programmer so you'd better check to make sure it is
17 > We depend greatly on Rsync to keep a fresh backup of our
18 > 70gb storage system that is the backend of http://www.indiana.edu/,
19 > Indiana University's main web site to the Internet.
21 I plan to do the same here instead of Tru64 vdump and vrestore
22 once I am sure backups by rsync is as reliable as vdump/vrestore.
23 Do you use rsync for root, usr partitions and and database files?
24 Have you had any problem with rsync so far?
28 Zoong Pham zpham@mercy.com.au
29 UNIX Systems Administrator Mercy Health and Aged Care Inc.
31 To get my PGP public key, email me with the subject:
32 Request for Zoong Pham's PGP public key
37 diff -u -r rsync-2.5.4/batch.c rsync-2.5.4.new/batch.c
38 --- rsync-2.5.4/batch.c Thu Feb 7 08:20:48 2002
39 +++ rsync-2.5.4.new/batch.c Fri Mar 22 09:24:01 2002
42 /* FIXME: This will break if s->count is ever not exactly an int. */
43 write_batch_csums_file(flist_entry, sizeof(int));
45 + write_batch_csums_file(&s->count, sizeof(int));
48 + write_batch_csums_file(&int_zero, sizeof(int));
51 write_batch_csums_file(s ? &s->count : &int_zero, sizeof(int));
55 for (i = 0; i < s->count; i++) {
56 diff -u -r rsync-2.5.4/config.h.in rsync-2.5.4.new/config.h.in
57 --- rsync-2.5.4/config.h.in Thu Feb 28 10:15:55 2002
58 +++ rsync-2.5.4.new/config.h.in Fri Mar 22 09:24:01 2002
60 /* Define if you have the `mknod' function. */
63 +/* Define if you have the `mkfifo' function. */
66 /* Define if you have the `mtrace' function. */
71 /* Define if you have the <sys/socket.h> header file. */
72 #undef HAVE_SYS_SOCKET_H
74 +/* Define if you have the <sys/un.h> header file. */
77 /* Define if you have the <sys/stat.h> header file. */
78 #undef HAVE_SYS_STAT_H
79 diff -u -r rsync-2.5.4/configure rsync-2.5.4.new/configure
80 --- rsync-2.5.4/configure Wed Mar 13 11:03:50 2002
81 +++ rsync-2.5.4.new/configure Fri Mar 22 09:24:01 2002
86 -for ac_header in sys/filio.h string.h stdlib.h sys/socket.h sys/mode.h
87 +for ac_header in sys/filio.h string.h stdlib.h sys/socket.h sys/mode.h sys/un.h
89 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
90 echo "$as_me:3420: checking for $ac_header" >&5
95 -for ac_func in waitpid wait4 getcwd strdup strerror chown chmod mknod
96 +for ac_func in waitpid wait4 getcwd strdup strerror chown chmod mknod mkfifo
98 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
99 echo "$as_me:6171: checking for $ac_func" >&5
100 diff -u -r rsync-2.5.4/configure.in rsync-2.5.4.new/configure.in
101 --- rsync-2.5.4/configure.in Wed Mar 13 11:03:34 2002
102 +++ rsync-2.5.4.new/configure.in Fri Mar 22 09:24:01 2002
105 AC_CHECK_HEADERS(sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h unistd.h utime.h grp.h)
106 AC_CHECK_HEADERS(compat.h sys/param.h ctype.h sys/wait.h sys/ioctl.h)
107 -AC_CHECK_HEADERS(sys/filio.h string.h stdlib.h sys/socket.h sys/mode.h)
108 +AC_CHECK_HEADERS(sys/filio.h string.h stdlib.h sys/socket.h sys/mode.h sys/un.h)
109 AC_CHECK_HEADERS(glob.h alloca.h mcheck.h sys/sysctl.h arpa/inet.h arpa/nameser.h)
110 AC_CHECK_HEADERS(netdb.h)
111 AC_CHECK_HEADERS(malloc.h)
113 AC_CHECK_FUNCS(inet_ntop, , AC_LIBOBJ(lib/inet_ntop))
114 AC_CHECK_FUNCS(inet_pton, , AC_LIBOBJ(lib/inet_pton))
116 -AC_CHECK_FUNCS(getaddrinfo, , AC_LIBOBJ(lib/getaddrinfo))
117 +# Tru64 UNIX has getaddrinfo() but has it renamed in libc as
118 +# something else so we must include <netdb.h> to get the
120 +AC_MSG_CHECKING([for getaddrinfo])
121 +AC_TRY_LINK([#include <sys/types.h>
122 +#include <sys/socket.h>
123 +#include <netdb.h>],[getaddrinfo(NULL, NULL, NULL, NULL);],
124 + [AC_MSG_RESULT([yes])
125 + AC_DEFINE(HAVE_GETADDRINFO, 1,
126 + [Define if you have the `getaddrinfo' function.])],
127 + [AC_MSG_RESULT([no])
128 + AC_LIBOBJ(lib/getaddrinfo)])
130 AC_CHECK_FUNCS(getnameinfo, , AC_LIBOBJ(lib/getnameinfo))
132 AC_CHECK_MEMBER([struct sockaddr.sa_len],
137 -AC_CHECK_FUNCS(waitpid wait4 getcwd strdup strerror chown chmod mknod)
138 +AC_CHECK_FUNCS(waitpid wait4 getcwd strdup strerror chown chmod mknod mkfifo)
139 AC_CHECK_FUNCS(fchmod fstat strchr readlink link utime utimes strftime)
140 AC_CHECK_FUNCS(memmove lchown vsnprintf snprintf asprintf setsid glob strpbrk)
141 AC_CHECK_FUNCS(strlcat strlcpy mtrace mallinfo setgroups)
142 diff -u -r rsync-2.5.4/lib/getaddrinfo.c rsync-2.5.4.new/lib/getaddrinfo.c
143 --- rsync-2.5.4/lib/getaddrinfo.c Fri Dec 14 16:33:12 2001
144 +++ rsync-2.5.4.new/lib/getaddrinfo.c Fri Mar 22 09:24:10 2002
149 +/****** Start Zoong added here */
151 +#define EAI_BADHINTS 12
152 +#define EAI_PROTOCOL 13
155 +#define AI_PASSIVE 0x00000001 /* get address to use bind() */
156 +#define AI_CANONNAME 0x00000002 /* fill ai_canonname */
157 +#define AI_NUMERICHOST 0x00000004 /* prevent name resolution */
158 +#define AI_MASK (AI_PASSIVE | AI_CANONNAME | AI_NUMERICHOST)
160 +/****** End Zoong added here */
163 #if defined(__KAME__) && defined(INET6)
166 diff -u -r rsync-2.5.4/rsync.h rsync-2.5.4.new/rsync.h
167 --- rsync-2.5.4/rsync.h Sat Feb 23 11:17:50 2002
168 +++ rsync-2.5.4.new/rsync.h Fri Mar 22 09:24:01 2002
170 #include <sys/socket.h>
173 +#ifdef HAVE_SYS_UN_H
174 +#define _SOCKADDR_LEN
181 diff -u -r rsync-2.5.4/syscall.c rsync-2.5.4.new/syscall.c
182 --- rsync-2.5.4/syscall.c Tue Feb 19 09:44:23 2002
183 +++ rsync-2.5.4.new/syscall.c Fri Mar 22 09:24:01 2002
186 if (dry_run) return 0;
190 + if (S_ISFIFO(mode)) {
191 + return mkfifo(pathname, mode);
196 + if (S_ISSOCK(mode)) {
198 + struct sockaddr_un saddr;
199 + int len = strlen(pathname) + 1; /* include null */
201 + saddr.sun_family = AF_UNIX;
202 + strncpy(saddr.sun_path, pathname, sizeof(saddr.sun_path));
203 + saddr.sun_len = len > sizeof(saddr.sun_path) ? sizeof(saddr.sun_path): len;
205 + if ((sock = socket(PF_UNIX, SOCK_STREAM, 0)) < 0) {
209 + if ((bind(sock, (struct sockaddr*)&saddr, sizeof(saddr))) < 0) {
213 + return do_chmod(pathname, mode);
218 return mknod(pathname, mode, dev);