diff -up rsync-3.1.0/configure.ac.orig rsync-3.1.0/configure.ac
--- rsync-3.1.0/configure.ac.orig	2013-09-28 14:55:54.062914560 -0600
+++ rsync-3.1.0/configure.ac	2013-10-24 14:27:24.333709312 -0600
@@ -455,6 +455,9 @@ if test x"$ac_cv_func_connect" = x"no"; 
 fi
 
 AC_SEARCH_LIBS(inet_ntop, resolv)
+AC_SEARCH_LIBS(socket, network)
+AC_SEARCH_LIBS(getpass, bsd)
+AC_SEARCH_LIBS(getxattr, gnu)
 
 # For OS X, Solaris, HP-UX, etc.: figure out if -liconv is needed.  We'll
 # accept either iconv_open or libiconv_open, since some include files map
@@ -1079,6 +1082,12 @@ else
 	AC_DEFINE(SUPPORT_XATTRS, 1)
 	AC_DEFINE(NO_SYMLINK_XATTRS, 1, [True if symlinks do not support xattrs])
 	;;
+    *haiku*)
+	AC_MSG_RESULT(Using Linux xattrs)
+	AC_DEFINE(HAVE_LINUX_XATTRS, 1, [True if you have Linux xattrs])
+	AC_DEFINE(SUPPORT_XATTRS, 1)
+	AC_DEFINE(NO_DEVICE_XATTRS, 1, [True if device files do not support xattrs])
+	;;
     *)
 	if test x"$enable_xattr_support" = x"yes"; then
 	    AC_MSG_ERROR(Failed to find extended attribute support)
diff -up rsync-3.1.0/rsync.h.orig rsync-3.1.0/rsync.h
--- rsync-3.1.0/rsync.h.orig	2013-09-28 14:55:54.002359296 -0600
+++ rsync-3.1.0/rsync.h	2013-10-24 14:27:08.025165824 -0600
@@ -442,7 +442,9 @@ enum delret {
 #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 -up rsync-3.1.0/testsuite/hands.test.orig rsync-3.1.0/testsuite/hands.test
--- rsync-3.1.0/testsuite/hands.test.orig	2008-07-20 23:28:19.066584576 -0600
+++ rsync-3.1.0/testsuite/hands.test	2013-10-24 14:27:08.049283072 -0600
@@ -15,7 +15,7 @@ DEBUG_OPTS="--debug=all0,deltasum0"
 
 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 $DEBUG_OPTS \"$fromdir/\" \"$todir\"" "$fromdir/" "$todir"'
 
 rm "$todir/text"
diff -up rsync-3.1.0/testsuite/relative.test.orig rsync-3.1.0/testsuite/relative.test
--- rsync-3.1.0/testsuite/relative.test.orig	2007-09-22 20:18:57.001310720 -0600
+++ rsync-3.1.0/testsuite/relative.test	2013-10-24 14:27:08.052690944 -0600
@@ -31,8 +31,8 @@ $RSYNC -ai --include=/down/ --exclude='/
 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"
