e2fsprogs-1.45.4.patchset revision 86112103
1From 979be15e98d2eb0c9a3b0ccf24e52ae7c71a55ac Mon Sep 17 00:00:00 2001
2From: Adrien Destugues <pulkomandy@pulkomandy.tk>
3Date: Sun, 25 Feb 2018 14:25:11 +0100
4Subject: Ugly hacks to get things building on Haiku.
5
6
7diff --git a/configure.ac b/configure.ac
8index 5e837c9..0d49ae5 100644
9--- a/configure.ac
10+++ b/configure.ac
11@@ -101,7 +101,8 @@ AC_MSG_ERROR([--with-ldopts no longer supported; use LDFLAGS= instead]))
12 dnl
13 AC_PROG_CC
14 if test "$GCC" = yes; then
15-   RDYNAMIC="-rdynamic"
16+   #RDYNAMIC="-rdynamic"
17+   RDYNAMIC=""
18    AC_SUBST(RDYNAMIC)
19 fi
20 AC_PROG_CPP
21@@ -1175,7 +1176,7 @@ dnl Check to see if -lsocket is required (solaris) to make something
22 dnl that uses socket() to compile; this is needed for the UUID library
23 dnl
24 SOCKET_LIB=''
25-AC_CHECK_LIB(socket, socket, [SOCKET_LIB=-lsocket])
26+AC_SEARCH_LIBS(socket, socket network, SOCKET_LIB=-lnetwork)
27 AC_SUBST(SOCKET_LIB)
28 dnl
29 dnl See if libmagic exists
30diff --git a/e2fsck/Makefile.in b/e2fsck/Makefile.in
31index 8fe05e0..14d6196 100644
32--- a/e2fsck/Makefile.in
33+++ b/e2fsck/Makefile.in
34@@ -16,7 +16,7 @@ MANPAGES=	e2fsck.8
35 FMANPAGES=	e2fsck.conf.5
36 
37 LIBS= $(LIBSUPPORT) $(LIBEXT2FS) $(LIBCOM_ERR) $(LIBBLKID) $(LIBUUID) \
38-	$(LIBINTL) $(LIBE2P) $(LIBMAGIC) $(SYSLIBS)
39+	$(LIBINTL) $(LIBE2P) $(LIBMAGIC) $(SYSLIBS) -lbsd
40 DEPLIBS= $(DEPLIBSUPPORT) $(LIBEXT2FS) $(DEPLIBCOM_ERR) $(DEPLIBBLKID) \
41 	 $(DEPLIBUUID) $(DEPLIBE2P)
42 
43diff --git a/e2fsck/e2fsck.h b/e2fsck/e2fsck.h
44index cd5cba2..6e1a7b9 100644
45--- a/e2fsck/e2fsck.h
46+++ b/e2fsck/e2fsck.h
47@@ -19,9 +19,7 @@
48 #ifdef HAVE_SYS_TYPES_H
49 #include <sys/types.h>
50 #endif
51-#ifdef HAVE_SYS_TIME_H
52 #include <sys/time.h>
53-#endif
54 #ifdef HAVE_SETJMP_H
55 #include <setjmp.h>
56 #endif
57diff --git a/misc/create_inode.c b/misc/create_inode.c
58index 05aa636..0d0d27c 100644
59--- a/misc/create_inode.c
60+++ b/misc/create_inode.c
61@@ -38,6 +38,11 @@
62 #include "create_inode.h"
63 #include "support/nls-enable.h"
64 
65+#ifdef __HAIKU__
66+#define major(x) 0
67+#define minor(x) (x)
68+#endif
69+
70 /* 64KiB is the minimum blksize to best minimize system call overhead. */
71 #define COPY_FILE_BUFLEN	65536
72 
73-- 
742.16.1
75
76
77From a3dc9722a2ebbd0320e266c8de4d4b0a8404ab19 Mon Sep 17 00:00:00 2001
78From: Adrien Destugues <pulkomandy@pulkomandy.tk>
79Date: Sun, 25 Feb 2018 15:38:54 +0100
80Subject: Extra patches.
81
82
83diff --git a/lib/blkid/devname.c b/lib/blkid/devname.c
84index e2b8051..46c9225 100644
85--- a/lib/blkid/devname.c
86+++ b/lib/blkid/devname.c
87@@ -43,6 +43,8 @@
88 
89 #include "blkidP.h"
90 
91+#define makedev(maj,min) (min)
92+
93 /*
94  * Find a dev struct in the cache by device name, if available.
95  *
96diff --git a/lib/blkid/devno.c b/lib/blkid/devno.c
97index 34ceb3c..4c9f34a 100644
98--- a/lib/blkid/devno.c
99+++ b/lib/blkid/devno.c
100@@ -37,6 +37,8 @@
101 
102 #include "blkidP.h"
103 
104+#define makedev(maj,min) (min)
105+
106 char *blkid_strndup(const char *s, int length)
107 {
108 	char *ret;
109diff --git a/lib/ext2fs/bmap64.h b/lib/ext2fs/bmap64.h
110index d8c7a3c..8ab1174 100644
111--- a/lib/ext2fs/bmap64.h
112+++ b/lib/ext2fs/bmap64.h
113@@ -9,6 +9,8 @@
114  * %End-Header%
115  */
116 
117+#include <sys/time.h>
118+
119 struct ext2_bmap_statistics {
120 	int		type;
121 	struct timeval	created;
122diff --git a/configure.ac b/configure.ac
123index ca24553..8bd3a14 100644
124--- a/configure.ac
125+++ b/configure.ac
126@@ -1321,8 +1321,8 @@ esac
127 dnl
128 dnl Check the available mount options
129 dnl
130-AX_CHECK_MOUNT_OPT(nosuid)
131-AX_CHECK_MOUNT_OPT(nodev)
132+dnl AX_CHECK_MOUNT_OPT(nosuid)
133+dnl AX_CHECK_MOUNT_OPT(nodev)
134 dnl Enable LTO for all packages
135 dnl
136 AC_ARG_ENABLE([lto],
137-- 
1382.16.1
139
140