xref: /OK3568_Linux_fs/buildroot/package/ecryptfs-utils/0001-musl.patch (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1fix musl build
2
3Patch inspired by
4https://github.com/kraj/meta-musl/blob/master/recipes-core/util-linux/util-linux-2.25/0001-switch_root-use-typeof-instead-of-__SWORD_TYPE-for-s.patch
5
6Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
7
8diff -uNr ecryptfs-utils-109.org/src/utils/mount.ecryptfs_private.c ecryptfs-utils-109/src/utils/mount.ecryptfs_private.c
9--- ecryptfs-utils-109.org/src/utils/mount.ecryptfs_private.c	2016-01-22 17:04:52.000000000 +0100
10+++ ecryptfs-utils-109/src/utils/mount.ecryptfs_private.c	2016-01-24 16:52:37.000000000 +0100
11@@ -224,6 +224,7 @@
12
13 static int check_cwd_f_type()
14 {
15+	struct statfs buf;
16 	/**
17 	 * This is *not* a list of compatible lower filesystems list for
18 	 * eCryptfs. This is a list of filesystems that we reasonably expect to
19@@ -235,7 +236,7 @@
20 	 * deceive other programs with a crafted /proc/self/*. See
21 	 * https://launchpad.net/bugs/1530566 for more details.
22 	 */
23-	__SWORD_TYPE f_type_whitelist[] = {
24+	typeof(buf.f_type) f_type_whitelist[] = {
25 		0x61756673 /* AUFS_SUPER_MAGIC */,
26 		0x9123683E /* BTRFS_SUPER_MAGIC */,
27 		0x00C36400 /* CEPH_SUPER_MAGIC */,
28@@ -259,7 +260,6 @@
29 		0x58465342 /* XFS_SB_MAGIC */,
30 		0x2FC12FC1 /* ZFS_SUPER_MAGIC */,
31 	};
32-	struct statfs buf;
33 	size_t i, whitelist_len;
34
35 	if (statfs(".", &buf) != 0) {
36