1From 8dcc4c2640a1910bbc4aeb2a2ac1d2e5173bbbb4 Mon Sep 17 00:00:00 2001
2From: Jerome Duval <jerome.duval@gmail.com>
3Date: Fri, 25 Dec 2015 22:07:28 +0000
4Subject: Haiku patch
5
6
7diff --git a/configure.ac b/configure.ac
8index a2c9955..14ae117 100644
9--- a/configure.ac
10+++ b/configure.ac
11@@ -697,6 +697,9 @@ if test x"$ac_cv_func_connect" = x"no"; then
12 fi
13 
14 AC_SEARCH_LIBS(inet_ntop, resolv)
15+AC_SEARCH_LIBS(socket, network)
16+AC_SEARCH_LIBS(getpass, bsd)
17+AC_SEARCH_LIBS(getxattr, gnu)
18 
19 # For OS X, Solaris, HP-UX, etc.: figure out if -liconv is needed.  We'll
20 # accept either iconv_open or libiconv_open, since some include files map
21@@ -1410,6 +1413,12 @@ else
22 	AC_DEFINE(SUPPORT_XATTRS, 1)
23 	AC_DEFINE(NO_SYMLINK_XATTRS, 1, [True if symlinks do not support xattrs])
24 	;;
25+    *haiku*)
26+	AC_MSG_RESULT(Using Linux xattrs)
27+	AC_DEFINE(HAVE_LINUX_XATTRS, 1, [True if you have Linux xattrs])
28+	AC_DEFINE(SUPPORT_XATTRS, 1)
29+	AC_DEFINE(NO_DEVICE_XATTRS, 1, [True if device files do not support xattrs])
30+	;;
31     *)
32 	if test x"$enable_xattr_support" = x"yes"; then
33 	    AC_MSG_ERROR(Failed to find extended attribute support)
34diff --git a/rsync.h b/rsync.h
35index d3709fe..8282d62 100644
36--- a/rsync.h
37+++ b/rsync.h
38@@ -486,7 +486,9 @@ enum delret {
39 #define MAKEDEV(devmajor,devminor) makedev(0,devmajor,devminor)
40 #else
41 #ifndef __TANDEM
42-#define MAKEDEV(devmajor,devminor) makedev(devmajor,devminor)
43+#define MAKEDEV(devmajor,devminor) ((dev_t)0)
44+#define major(dev) (0)
45+#define minor(dev) (0)
46 #else
47 # define major DEV_TO_MAJOR
48 # define minor DEV_TO_MINOR
49diff --git a/testsuite/hands.test b/testsuite/hands.test
50index 8e265b7..610ae79 100644
51--- a/testsuite/hands.test
52+++ b/testsuite/hands.test
53@@ -15,7 +15,7 @@ DEBUG_OPTS="--debug=all0,deltasum0"
54 
55 runtest "basic operation" 'checkit "$RSYNC -av \"$fromdir/\" \"$todir\"" "$fromdir/" "$todir"'
56 
57-ln "$fromdir/filelist" "$fromdir/dir"
58+cp -p "$fromdir/filelist" "$fromdir/dir"
59 runtest "hard links" 'checkit "$RSYNC -avH --bwlimit=0 $DEBUG_OPTS \"$fromdir/\" \"$todir\"" "$fromdir/" "$todir"'
60 
61 rm "$todir/text"
62-- 
632.37.3
64
65