diff options
author | Khem Raj <raj.khem@gmail.com> | 2017-07-14 11:34:52 -0700 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2017-07-24 18:57:36 +0200 |
commit | 222db35a89fa12badfc3e3339eae0ab6d47459e9 (patch) | |
tree | d4d6fdf9a98e797b2a74a1d915f4d9c0b585d6dd /meta-filesystems | |
parent | e16fef4f4d1ea2ec0fab8d0f3c898e4fcc687343 (diff) | |
download | meta-openembedded-222db35a89fa12badfc3e3339eae0ab6d47459e9.tar.gz |
xfsdump: Fix build with musl
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-filesystems')
6 files changed, 253 insertions, 2 deletions
diff --git a/meta-filesystems/recipes-utils/xfsdump/files/0001-Include-fcntl.h-for-O_EXCL.patch b/meta-filesystems/recipes-utils/xfsdump/files/0001-Include-fcntl.h-for-O_EXCL.patch new file mode 100644 index 000000000..660468d73 --- /dev/null +++ b/meta-filesystems/recipes-utils/xfsdump/files/0001-Include-fcntl.h-for-O_EXCL.patch | |||
@@ -0,0 +1,28 @@ | |||
1 | From 8cf48da5f645dd7bbb1ccbeab5bb0964f40f17f7 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Thu, 13 Jul 2017 23:18:47 -0700 | ||
4 | Subject: [PATCH 1/5] Include fcntl.h for O_EXCL | ||
5 | |||
6 | Fix | ||
7 | error: 'O_CREAT' undeclared (first use in this function) | ||
8 | |||
9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
10 | --- | ||
11 | invutil/invidx.c | 1 + | ||
12 | 1 file changed, 1 insertion(+) | ||
13 | |||
14 | diff --git a/invutil/invidx.c b/invutil/invidx.c | ||
15 | index 67efdf7..325a9a1 100644 | ||
16 | --- a/invutil/invidx.c | ||
17 | +++ b/invutil/invidx.c | ||
18 | @@ -27,6 +27,7 @@ | ||
19 | #include <sys/stat.h> | ||
20 | #include <string.h> | ||
21 | #include <uuid/uuid.h> | ||
22 | +#include <fcntl.h> | ||
23 | |||
24 | #include "types.h" | ||
25 | #include "mlog.h" | ||
26 | -- | ||
27 | 2.13.2 | ||
28 | |||
diff --git a/meta-filesystems/recipes-utils/xfsdump/files/0002-Replace-__uint32_t-with-uint32_t.patch b/meta-filesystems/recipes-utils/xfsdump/files/0002-Replace-__uint32_t-with-uint32_t.patch new file mode 100644 index 000000000..ed3e0a9e9 --- /dev/null +++ b/meta-filesystems/recipes-utils/xfsdump/files/0002-Replace-__uint32_t-with-uint32_t.patch | |||
@@ -0,0 +1,122 @@ | |||
1 | From f76d2142905f0e5bd830d5d576c235af1171c6ac Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Thu, 13 Jul 2017 23:23:31 -0700 | ||
4 | Subject: [PATCH 2/5] Replace __uint32_t with uint32_t | ||
5 | |||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | --- | ||
8 | common/content_inode.h | 4 ++-- | ||
9 | doc/xfsdump.html | 8 ++++---- | ||
10 | inventory/inv_oref.h | 2 +- | ||
11 | inventory/inv_priv.h | 4 ++-- | ||
12 | inventory/inventory.h | 2 +- | ||
13 | 5 files changed, 10 insertions(+), 10 deletions(-) | ||
14 | |||
15 | diff --git a/common/content_inode.h b/common/content_inode.h | ||
16 | index a69a9a0..6936e05 100644 | ||
17 | --- a/common/content_inode.h | ||
18 | +++ b/common/content_inode.h | ||
19 | @@ -191,10 +191,10 @@ typedef struct bstat bstat_t; | ||
20 | * and using two 16bit values to hold new 32bit projid was choosen | ||
21 | * to retain compatibility with "old" filesystems). | ||
22 | */ | ||
23 | -static inline __uint32_t | ||
24 | +static inline uint32_t | ||
25 | bstat_projid(struct bstat *bs) | ||
26 | { | ||
27 | - return (__uint32_t)bs->bs_projid_hi << 16 | bs->bs_projid_lo; | ||
28 | + return (uint32_t)bs->bs_projid_hi << 16 | bs->bs_projid_lo; | ||
29 | } | ||
30 | |||
31 | |||
32 | diff --git a/doc/xfsdump.html b/doc/xfsdump.html | ||
33 | index 9c6722e..f85128f 100644 | ||
34 | --- a/doc/xfsdump.html | ||
35 | +++ b/doc/xfsdump.html | ||
36 | @@ -1935,7 +1935,7 @@ The files are constructed like so: | ||
37 | <pre> | ||
38 | typedef struct invt_counter { | ||
39 | INVT_COUNTER_FIELDS | ||
40 | - __uint32_t ic_vernum;/* on disk version number for posterity */\ | ||
41 | + uint32_t ic_vernum;/* on disk version number for posterity */\ | ||
42 | u_int ic_curnum;/* number of sessions/invindices recorded \ | ||
43 | so far */ \ | ||
44 | u_int ic_maxnum;/* maximum number of sessions/inv_indices \ | ||
45 | @@ -1975,7 +1975,7 @@ typedef struct invt_fstab { | ||
46 | <pre> | ||
47 | typedef struct invt_counter { | ||
48 | INVT_COUNTER_FIELDS | ||
49 | - __uint32_t ic_vernum;/* on disk version number for posterity */\ | ||
50 | + uint32_t ic_vernum;/* on disk version number for posterity */\ | ||
51 | u_int ic_curnum;/* number of sessions/invindices recorded \ | ||
52 | so far */ \ | ||
53 | u_int ic_maxnum;/* maximum number of sessions/inv_indices \ | ||
54 | @@ -2012,7 +2012,7 @@ typedef struct invt_entry { | ||
55 | <pre> | ||
56 | typedef struct invt_sescounter { | ||
57 | INVT_COUNTER_FIELDS | ||
58 | - __uint32_t ic_vernum;/* on disk version number for posterity */\ | ||
59 | + uint32_t ic_vernum;/* on disk version number for posterity */\ | ||
60 | u_int ic_curnum;/* number of sessions/invindices recorded \ | ||
61 | so far */ \ | ||
62 | u_int ic_maxnum;/* maximum number of sessions/inv_indices \ | ||
63 | @@ -2034,7 +2034,7 @@ typedef struct invt_seshdr { | ||
64 | off64_t sh_streams_off; /* offset to start of the set of | ||
65 | stream hdrs */ | ||
66 | time_t sh_time; /* time of the dump */ | ||
67 | - __uint32_t sh_flag; /* for misc flags */ | ||
68 | + uint32_t sh_flag; /* for misc flags */ | ||
69 | u_char sh_level; /* dump level */ | ||
70 | u_char sh_pruned; /* pruned by invutil flag */ | ||
71 | char sh_padding[22]; | ||
72 | diff --git a/inventory/inv_oref.h b/inventory/inv_oref.h | ||
73 | index e16684d..38303a4 100644 | ||
74 | --- a/inventory/inv_oref.h | ||
75 | +++ b/inventory/inv_oref.h | ||
76 | @@ -46,7 +46,7 @@ | ||
77 | |||
78 | |||
79 | |||
80 | -typedef __uint32_t invt_objtype_t; | ||
81 | +typedef uint32_t invt_objtype_t; | ||
82 | |||
83 | #define INVT_LOCKED 0x0001 | ||
84 | |||
85 | diff --git a/inventory/inv_priv.h b/inventory/inv_priv.h | ||
86 | index 1690271..364ffbc 100644 | ||
87 | --- a/inventory/inv_priv.h | ||
88 | +++ b/inventory/inv_priv.h | ||
89 | @@ -120,7 +120,7 @@ typedef struct invt_seshdr { | ||
90 | off64_t sh_streams_off; /* offset to start of the set of | ||
91 | stream hdrs */ | ||
92 | time32_t sh_time; /* time of the dump */ | ||
93 | - __uint32_t sh_flag; /* for misc flags */ | ||
94 | + uint32_t sh_flag; /* for misc flags */ | ||
95 | u_char sh_level; /* dump level */ | ||
96 | u_char sh_pruned; /* pruned by invutil flag */ | ||
97 | char sh_padding[22]; | ||
98 | @@ -184,7 +184,7 @@ typedef struct invt_entry { | ||
99 | |||
100 | /* Cheap Inheritance, and an attempt to avoid a nested type */ | ||
101 | #define INVT_COUNTER_FIELDS \ | ||
102 | - __uint32_t ic_vernum;/* on disk version number for posterity */\ | ||
103 | + uint32_t ic_vernum;/* on disk version number for posterity */\ | ||
104 | uint ic_curnum;/* number of sessions/invindices recorded \ | ||
105 | so far */ \ | ||
106 | uint ic_maxnum;/* maximum number of sessions/inv_indices \ | ||
107 | diff --git a/inventory/inventory.h b/inventory/inventory.h | ||
108 | index 134b9ba..c1d7403 100644 | ||
109 | --- a/inventory/inventory.h | ||
110 | +++ b/inventory/inventory.h | ||
111 | @@ -43,7 +43,7 @@ | ||
112 | /* length of labels, mntpts, etc */ | ||
113 | #define INV_STRLEN GLOBAL_HDR_STRING_SZ | ||
114 | |||
115 | -typedef __uint32_t inv_version_t; | ||
116 | +typedef uint32_t inv_version_t; | ||
117 | |||
118 | /* This is the general inventory version. | ||
119 | */ | ||
120 | -- | ||
121 | 2.13.2 | ||
122 | |||
diff --git a/meta-filesystems/recipes-utils/xfsdump/files/0003-replace-use-of-SIGCLD-with-SIGCHLD.patch b/meta-filesystems/recipes-utils/xfsdump/files/0003-replace-use-of-SIGCLD-with-SIGCHLD.patch new file mode 100644 index 000000000..31303d8fa --- /dev/null +++ b/meta-filesystems/recipes-utils/xfsdump/files/0003-replace-use-of-SIGCLD-with-SIGCHLD.patch | |||
@@ -0,0 +1,40 @@ | |||
1 | From fcc0cf15a309947103a0695b8a1f4865b820eb5c Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Thu, 13 Jul 2017 23:26:03 -0700 | ||
4 | Subject: [PATCH 3/5] replace use of SIGCLD with SIGCHLD | ||
5 | |||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | --- | ||
8 | common/main.c | 2 +- | ||
9 | doc/xfsdump.html | 2 +- | ||
10 | 2 files changed, 2 insertions(+), 2 deletions(-) | ||
11 | |||
12 | diff --git a/common/main.c b/common/main.c | ||
13 | index 3848499..faa66ee 100644 | ||
14 | --- a/common/main.c | ||
15 | +++ b/common/main.c | ||
16 | @@ -2225,7 +2225,7 @@ static sig_printmap_t sig_printmap[ ] = { | ||
17 | {SIGTERM, "SIGTERM"}, | ||
18 | {SIGUSR1, "SIGUSR1"}, | ||
19 | {SIGUSR2, "SIGUSR2"}, | ||
20 | - {SIGCLD, "SIGCLD"}, | ||
21 | + {SIGCHLD, "SIGCHLD"}, | ||
22 | {SIGPWR, "SIGPWR"}, | ||
23 | {SIGURG, "SIGURG"}, | ||
24 | {SIGPOLL, "SIGPOLL"}, | ||
25 | diff --git a/doc/xfsdump.html b/doc/xfsdump.html | ||
26 | index f85128f..d96f037 100644 | ||
27 | --- a/doc/xfsdump.html | ||
28 | +++ b/doc/xfsdump.html | ||
29 | @@ -334,7 +334,7 @@ the ring buffer. It ignores signals and does not terminate until it | ||
30 | receives a RING_OP_DIE message. It then exits 0. | ||
31 | <p> | ||
32 | The main process sleeps waiting for any of its children to die | ||
33 | -(ie. waiting for a SIGCLD). All children that it cares about (stream | ||
34 | +(ie. waiting for a SIGCHLD). All children that it cares about (stream | ||
35 | managers and ring buffer slaves) are registered through the child | ||
36 | manager abstraction. When a child dies wait status and other info is | ||
37 | stored with its entry in the child manager. main() ignores the deaths | ||
38 | -- | ||
39 | 2.13.2 | ||
40 | |||
diff --git a/meta-filesystems/recipes-utils/xfsdump/files/0004-include-limit.h-for-PATH_MAX.patch b/meta-filesystems/recipes-utils/xfsdump/files/0004-include-limit.h-for-PATH_MAX.patch new file mode 100644 index 000000000..62ea15b86 --- /dev/null +++ b/meta-filesystems/recipes-utils/xfsdump/files/0004-include-limit.h-for-PATH_MAX.patch | |||
@@ -0,0 +1,29 @@ | |||
1 | From 98c7d96f0f2c6eddf60aa4a1a08d7d4467645930 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Thu, 13 Jul 2017 23:28:10 -0700 | ||
4 | Subject: [PATCH 4/5] include limit.h for PATH_MAX | ||
5 | |||
6 | fixed | ||
7 | var.c:42:12: error: 'PATH_MAX' undeclared (first use in this function); did you mean 'RAND_MAX'? | ||
8 | char path[PATH_MAX];` | ||
9 | |||
10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
11 | --- | ||
12 | dump/var.c | 1 + | ||
13 | 1 file changed, 1 insertion(+) | ||
14 | |||
15 | diff --git a/dump/var.c b/dump/var.c | ||
16 | index 645caab..8156d37 100644 | ||
17 | --- a/dump/var.c | ||
18 | +++ b/dump/var.c | ||
19 | @@ -16,6 +16,7 @@ | ||
20 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
21 | */ | ||
22 | |||
23 | +#include <limits.h> | ||
24 | #include <unistd.h> | ||
25 | #include <stdlib.h> | ||
26 | #include <sys/stat.h> | ||
27 | -- | ||
28 | 2.13.2 | ||
29 | |||
diff --git a/meta-filesystems/recipes-utils/xfsdump/files/0005-include-sys-types.h-for-u_int32_t-in-attr-attributes.patch b/meta-filesystems/recipes-utils/xfsdump/files/0005-include-sys-types.h-for-u_int32_t-in-attr-attributes.patch new file mode 100644 index 000000000..fb6e467c9 --- /dev/null +++ b/meta-filesystems/recipes-utils/xfsdump/files/0005-include-sys-types.h-for-u_int32_t-in-attr-attributes.patch | |||
@@ -0,0 +1,27 @@ | |||
1 | From d95f494de1aa8123c74170ffebaed8ea89649da2 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Thu, 13 Jul 2017 23:33:44 -0700 | ||
4 | Subject: [PATCH 5/5] include sys/types.h for u_int32_t in attr/attributes.h | ||
5 | |||
6 | error: unknown type name 'u_int32_t' | ||
7 | |||
8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
9 | --- | ||
10 | restore/content.c | 1 + | ||
11 | 1 file changed, 1 insertion(+) | ||
12 | |||
13 | diff --git a/restore/content.c b/restore/content.c | ||
14 | index 7c4a81f..1d5de1b 100644 | ||
15 | --- a/restore/content.c | ||
16 | +++ b/restore/content.c | ||
17 | @@ -24,6 +24,7 @@ | ||
18 | #include <sys/param.h> | ||
19 | #include <sys/stat.h> | ||
20 | #include <sys/ioctl.h> | ||
21 | +#include <sys/types.h> | ||
22 | #include <attr/attributes.h> | ||
23 | #include <xfs/handle.h> | ||
24 | #include <time.h> | ||
25 | -- | ||
26 | 2.13.2 | ||
27 | |||
diff --git a/meta-filesystems/recipes-utils/xfsdump/xfsdump_3.1.6.bb b/meta-filesystems/recipes-utils/xfsdump/xfsdump_3.1.6.bb index ecc746829..d1033cff1 100644 --- a/meta-filesystems/recipes-utils/xfsdump/xfsdump_3.1.6.bb +++ b/meta-filesystems/recipes-utils/xfsdump/xfsdump_3.1.6.bb | |||
@@ -11,8 +11,13 @@ LIC_FILES_CHKSUM = "file://doc/COPYING;md5=15c832894d10ddd00dfcf57bee490ecc" | |||
11 | DEPENDS = "xfsprogs attr" | 11 | DEPENDS = "xfsprogs attr" |
12 | 12 | ||
13 | SRC_URI = "ftp://oss.sgi.com/projects/xfs/cmd_tars/${BPN}-${PV}.tar.gz \ | 13 | SRC_URI = "ftp://oss.sgi.com/projects/xfs/cmd_tars/${BPN}-${PV}.tar.gz \ |
14 | file://remove-install-as-user.patch \ | 14 | file://remove-install-as-user.patch \ |
15 | " | 15 | file://0001-Include-fcntl.h-for-O_EXCL.patch \ |
16 | file://0002-Replace-__uint32_t-with-uint32_t.patch \ | ||
17 | file://0003-replace-use-of-SIGCLD-with-SIGCHLD.patch \ | ||
18 | file://0004-include-limit.h-for-PATH_MAX.patch \ | ||
19 | file://0005-include-sys-types.h-for-u_int32_t-in-attr-attributes.patch \ | ||
20 | " | ||
16 | SRC_URI[md5sum] = "50353cd4f4b435685955363e6044f4d1" | 21 | SRC_URI[md5sum] = "50353cd4f4b435685955363e6044f4d1" |
17 | SRC_URI[sha256sum] = "7f78c11ca527477d90e5e62b0778f3ad96f2b71c19173044e9aca9515fff42d0" | 22 | SRC_URI[sha256sum] = "7f78c11ca527477d90e5e62b0778f3ad96f2b71c19173044e9aca9515fff42d0" |
18 | 23 | ||