diff -ruaw rsync-3.0.6/configure.in rsync-3.0.6-haiku/configure.in
--- rsync-3.0.6/configure.in	2009-05-08 19:07:14.000000000 +0200
+++ rsync-3.0.6-haiku/configure.in	2009-05-25 19:46:42.000000000 +0200
@@ -408,6 +408,8 @@
 fi
 
 AC_SEARCH_LIBS(inet_ntop, resolv)
+AC_SEARCH_LIBS(socket, network)
+AC_SEARCH_LIBS(getpass, bsd)
 
 # Solaris and HP-UX weirdness:
 # Search for libiconv_open (not iconv_open) to discover if -liconv is needed!
diff -ruaw rsync-3.0.6/Makefile.in rsync-3.0.6-haiku/Makefile.in
--- rsync-3.0.6/Makefile.in	2009-04-11 01:24:49.000000000 +0200
+++ rsync-3.0.6-haiku/Makefile.in	2009-05-26 11:47:12.000000000 +0200
@@ -7,7 +7,7 @@
 bindir=@bindir@
 mandir=@mandir@
 
-LIBS=@LIBS@
+LIBS=@LIBS@ -lz
 CC=@CC@
 CFLAGS=@CFLAGS@
 CPPFLAGS=@CPPFLAGS@
@@ -30,8 +30,8 @@
 HEADERS=byteorder.h config.h errcode.h proto.h rsync.h ifuncs.h lib/pool_alloc.h
 LIBOBJ=lib/wildmatch.o lib/compat.o lib/snprintf.o lib/mdfour.o lib/md5.o \
 	lib/permstring.o lib/pool_alloc.o lib/sysacls.o lib/sysxattrs.o @LIBOBJS@
-ZLIBOBJ=zlib/deflate.o zlib/inffast.o zlib/inflate.o zlib/inftrees.o \
-	zlib/trees.o zlib/zutil.o zlib/adler32.o zlib/compress.o zlib/crc32.o
+#ZLIBOBJ=zlib/deflate.o zlib/inffast.o zlib/inflate.o zlib/inftrees.o \
+#	zlib/trees.o zlib/zutil.o zlib/adler32.o zlib/compress.o zlib/crc32.o
 OBJS1=flist.o rsync.o generator.o receiver.o cleanup.o sender.o exclude.o \
 	util.o main.o checksum.o match.o syscall.o log.o backup.o
 OBJS2=options.o io.o compat.o hlink.o token.o uidlist.o socket.o hashtable.o \
@@ -40,7 +40,7 @@
 DAEMON_OBJ = params.o loadparm.o clientserver.o access.o connection.o authenticate.o
 popt_OBJS=popt/findme.o  popt/popt.o  popt/poptconfig.o \
 	popt/popthelp.o popt/poptparse.o
-OBJS=$(OBJS1) $(OBJS2) $(OBJS3) $(DAEMON_OBJ) $(LIBOBJ) $(ZLIBOBJ) @BUILD_POPT@
+OBJS=$(OBJS1) $(OBJS2) $(OBJS3) $(DAEMON_OBJ) $(LIBOBJ) @BUILD_POPT@
 
 TLS_OBJ = tls.o syscall.o lib/compat.o lib/snprintf.o lib/permstring.o lib/sysxattrs.o @BUILD_POPT@
 
diff -ruaw rsync-3.0.6/rsync.h rsync-3.0.6-haiku/rsync.h
--- rsync-3.0.6/rsync.h	2009-02-14 16:57:50.000000000 +0100
+++ rsync-3.0.6-haiku/rsync.h	2009-05-25 19:45:29.000000000 +0200
@@ -385,7 +385,9 @@
 #ifdef MAKEDEV_TAKES_3_ARGS
 #define MAKEDEV(devmajor,devminor) makedev(0,devmajor,devminor)
 #else
-#define MAKEDEV(devmajor,devminor) makedev(devmajor,devminor)
+#define MAKEDEV(devmajor,devminor) ((dev_t)0)
+#define major(dev) (0)
+#define minor(dev) (0)
 #endif
 
 #ifdef HAVE_COMPAT_H
diff -ruaw rsync-3.0.6/testsuite/hands.test rsync-3.0.6-haiku/testsuite/hands.test
--- rsync-3.0.6/testsuite/hands.test	2007-03-18 21:40:01.000000000 +0100
+++ rsync-3.0.6-haiku/testsuite/hands.test	2009-05-25 20:32:35.000000000 +0200
@@ -13,7 +13,7 @@
 
 runtest "basic operation" 'checkit "$RSYNC -av \"$fromdir/\" \"$todir\"" "$fromdir/" "$todir"'
 
-ln "$fromdir/filelist" "$fromdir/dir"
+cp -p "$fromdir/filelist" "$fromdir/dir"
 runtest "hard links" 'checkit "$RSYNC -avH \"$fromdir/\" \"$todir\"" "$fromdir/" "$todir"'
 
 rm "$todir/text"
diff -ruaw rsync-3.0.6/testsuite/relative.test rsync-3.0.6-haiku/testsuite/relative.test
--- rsync-3.0.6/testsuite/relative.test	2007-09-23 04:18:57.000000000 +0200
+++ rsync-3.0.6-haiku/testsuite/relative.test	2009-05-25 20:33:16.000000000 +0200
@@ -31,8 +31,8 @@
 sleep 1
 runtest "basic relative" 'checkit "$RSYNC -avR ./$deepstr \"$todir\"" "$chkdir" "$todir"'
 
-ln $deepstr/filelist $deepstr/dir
-ln ../chk/$deepstr/filelist ../chk/$deepstr/dir
+cp -p $deepstr/filelist $deepstr/dir
+cp -p ../chk/$deepstr/filelist ../chk/$deepstr/dir
 runtest "hard links" 'checkit "$RSYNC -avHR ./$deepstr/ \"$todir\"" "$chkdir" "$todir"'
 
 cp "$deepdir/text" "$todir/$deepstr/ThisShouldGo"
