diff options
author | Khem Raj <raj.khem@gmail.com> | 2024-01-08 20:12:39 -0800 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2024-01-09 06:54:08 -0800 |
commit | 4caa10faa85c1d67c91fc6870ce8956471e74e9d (patch) | |
tree | 84acf7c3e847e265447ed76e18313e9a6d416940 /meta-networking | |
parent | 15abedd8ab5ae20c9ce30bd06c59d18eed2004a9 (diff) | |
download | meta-openembedded-4caa10faa85c1d67c91fc6870ce8956471e74e9d.tar.gz |
tgt: Fix build with musl
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-networking')
-rw-r--r-- | meta-networking/recipes-extended/tgt/files/musl-__wordsize.patch | 41 | ||||
-rw-r--r-- | meta-networking/recipes-extended/tgt/tgt_1.0.90.bb | 6 |
2 files changed, 44 insertions, 3 deletions
diff --git a/meta-networking/recipes-extended/tgt/files/musl-__wordsize.patch b/meta-networking/recipes-extended/tgt/files/musl-__wordsize.patch new file mode 100644 index 000000000..ac758cc39 --- /dev/null +++ b/meta-networking/recipes-extended/tgt/files/musl-__wordsize.patch | |||
@@ -0,0 +1,41 @@ | |||
1 | The definition of __WORDSIZE is found in <sys/reg.h> | ||
2 | |||
3 | Upstream-Status: Pending | ||
4 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
5 | |||
6 | --- a/usr/iscsi/iscsid.h | ||
7 | +++ b/usr/iscsi/iscsid.h | ||
8 | @@ -22,6 +22,9 @@ | ||
9 | #include <stdint.h> | ||
10 | #include <inttypes.h> | ||
11 | #include <netdb.h> | ||
12 | +#if !defined(__GLIBC__) | ||
13 | +#include <sys/reg.h> | ||
14 | +#endif | ||
15 | |||
16 | #include "transport.h" | ||
17 | #include "list.h" | ||
18 | --- a/usr/tgtd.h | ||
19 | +++ b/usr/tgtd.h | ||
20 | @@ -1,6 +1,9 @@ | ||
21 | #ifndef __TARGET_DAEMON_H | ||
22 | #define __TARGET_DAEMON_H | ||
23 | |||
24 | +#if !defined(__GLIBC__) | ||
25 | +#include <sys/reg.h> | ||
26 | +#endif | ||
27 | #include "log.h" | ||
28 | #include "scsi_cmnd.h" | ||
29 | #include "tgtadm_error.h" | ||
30 | --- a/usr/util.h | ||
31 | +++ b/usr/util.h | ||
32 | @@ -19,6 +19,9 @@ | ||
33 | #include <linux/fs.h> | ||
34 | #include <sys/types.h> | ||
35 | #include <sys/stat.h> | ||
36 | +#if !defined(__GLIBC__) | ||
37 | +#include <sys/reg.h> | ||
38 | +#endif | ||
39 | |||
40 | #include "be_byteshift.h" | ||
41 | |||
diff --git a/meta-networking/recipes-extended/tgt/tgt_1.0.90.bb b/meta-networking/recipes-extended/tgt/tgt_1.0.90.bb index f68ae99db..35995f787 100644 --- a/meta-networking/recipes-extended/tgt/tgt_1.0.90.bb +++ b/meta-networking/recipes-extended/tgt/tgt_1.0.90.bb | |||
@@ -7,9 +7,10 @@ DEPENDS = "sg3-utils libaio" | |||
7 | SRCREV = "df991fa788e22cd8b8e3013cfae306988c19c3d0" | 7 | SRCREV = "df991fa788e22cd8b8e3013cfae306988c19c3d0" |
8 | 8 | ||
9 | SRC_URI = "git://github.com/fujita/tgt.git;branch=master;protocol=https \ | 9 | SRC_URI = "git://github.com/fujita/tgt.git;branch=master;protocol=https \ |
10 | file://0001-Correct-the-path-of-header-files-check-in-Yocto-buil.patch \ | 10 | file://0001-Correct-the-path-of-header-files-check-in-Yocto-buil.patch \ |
11 | file://0001-usr-Makefile-WARNING-fix.patch \ | 11 | file://0001-usr-Makefile-WARNING-fix.patch \ |
12 | file://usr-Makefile-apply-LDFLAGS-to-all-executables.patch \ | 12 | file://usr-Makefile-apply-LDFLAGS-to-all-executables.patch \ |
13 | file://musl-__wordsize.patch \ | ||
13 | " | 14 | " |
14 | SRC_URI += "file://tgtd.init \ | 15 | SRC_URI += "file://tgtd.init \ |
15 | file://tgtd.service \ | 16 | file://tgtd.service \ |
@@ -18,8 +19,6 @@ SRC_URI += "file://tgtd.init \ | |||
18 | 19 | ||
19 | S = "${WORKDIR}/git" | 20 | S = "${WORKDIR}/git" |
20 | 21 | ||
21 | COMPATIBLE_HOST:libc-musl = "null" | ||
22 | |||
23 | CONFFILES:${PN} += "${sysconfdir}/tgt/targets.conf" | 22 | CONFFILES:${PN} += "${sysconfdir}/tgt/targets.conf" |
24 | 23 | ||
25 | inherit update-rc.d systemd | 24 | inherit update-rc.d systemd |
@@ -29,6 +28,7 @@ SYSTEMD_AUTO_ENABLE:${PN} = "disable" | |||
29 | 28 | ||
30 | CFLAGS += ' -I. -DUSE_SIGNALFD -DUSE_TIMERFD -D_GNU_SOURCE -DTGT_VERSION=\\"1.0.63\\" -DBSDIR=\\"${libdir}/backing-store\\"' | 29 | CFLAGS += ' -I. -DUSE_SIGNALFD -DUSE_TIMERFD -D_GNU_SOURCE -DTGT_VERSION=\\"1.0.63\\" -DBSDIR=\\"${libdir}/backing-store\\"' |
31 | 30 | ||
31 | CFLAGS:append:libc-musl = " -D_LARGEFILE64_SOURCE" | ||
32 | #do_compile() { | 32 | #do_compile() { |
33 | # oe_runmake SYSROOT="${STAGING_DIR_TARGET}" -e programs conf scripts | 33 | # oe_runmake SYSROOT="${STAGING_DIR_TARGET}" -e programs conf scripts |
34 | #} | 34 | #} |