diff options
Diffstat (limited to 'meta-openembedded/meta-oe/recipes-support/lockdev')
2 files changed, 33 insertions, 7 deletions
diff --git a/meta-openembedded/meta-oe/recipes-support/lockdev/lockdev/0001-lockdev-Define-MAJOR-MINOR-for-non-glibc-case.patch b/meta-openembedded/meta-oe/recipes-support/lockdev/lockdev/0001-lockdev-Define-MAJOR-MINOR-for-non-glibc-case.patch new file mode 100644 index 0000000000..abcf1bc20f --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-support/lockdev/lockdev/0001-lockdev-Define-MAJOR-MINOR-for-non-glibc-case.patch @@ -0,0 +1,28 @@ +From 11c78232aa589d5ed43eea3683e6e3de0362ffdc Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Tue, 26 Apr 2022 10:00:32 -0700 +Subject: [PATCH] lockdev: Define MAJOR/MINOR for non-glibc case + +gnu_dev_major and gnu_dev_minor are glibc extensions but we do have +major/minor macros on musl too, so use them to define MINOR/MAJOR here + +Upstream-Status: Inappropriate [No active upstream] + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/lockdev.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/src/lockdev.c ++++ b/src/lockdev.c +@@ -125,8 +125,8 @@ + #include <sys/file.h> + #if defined (__GNU_LIBRARY__) + # include <sys/sysmacros.h> +-# define MAJOR(dev) gnu_dev_major (dev) +-# define MINOR(dev) gnu_dev_minor (dev) ++# define MAJOR(dev) major (dev) ++# define MINOR(dev) minor (dev) + #else + # error "put here a define for MAJOR and MINOR" + #endif diff --git a/meta-openembedded/meta-oe/recipes-support/lockdev/lockdev_1.0.3.bb b/meta-openembedded/meta-oe/recipes-support/lockdev/lockdev_1.0.3.bb index d84041ce63..a52ca25da4 100644 --- a/meta-openembedded/meta-oe/recipes-support/lockdev/lockdev_1.0.3.bb +++ b/meta-openembedded/meta-oe/recipes-support/lockdev/lockdev_1.0.3.bb @@ -5,22 +5,20 @@ LIC_FILES_CHKSUM="file://LICENSE;md5=d8045f3b8f929c1cb29a1e3fd737b499" PE = "1" SRC_URI = "http://snapshot.debian.org/archive/debian/20141023T043132Z/pool/main/l/lockdev/lockdev_${PV}.orig.tar.gz \ - http://snapshot.debian.org/archive/debian/20141023T043132Z/pool/main/l/lockdev/lockdev_${PV}-1.6.diff.gz;name=debianpatch \ file://cross_compile.patch \ file://build.patch \ + file://0001-lockdev-Define-MAJOR-MINOR-for-non-glibc-case.patch \ " -SRC_URI[md5sum] = "64b9c1b87b125fc348e892e24625524a" SRC_URI[sha256sum] = "ccae635d7ac3fdd50897eceb250872b3d9a191d298f213e7f0c836910d869f82" -SRC_URI[debianpatch.md5sum] = "5ef6267c42fca9145e0af006ccb6aff7" -SRC_URI[debianpatch.sha256sum] = "a5405c6ee5e97e45eeb1c81330a7e9f444a58bda5e6771fa30007516c115007e" inherit lib_package perlnative -CFLAGS += " -D__GNU_LIBRARY__" - TARGET_CC_ARCH += "${LDFLAGS}" -EXTRA_OEMAKE = "basedir=${D}${prefix} baselib=${baselib} LD='${CC}' LD='${CC}'" +CFLAGS:append:libc-musl = " -D__GNU_LIBRARY__" + +EXTRA_OEMAKE = "basedir=${D}${prefix} baselib=${baselib} LD='${CC}'" + do_compile() { oe_runmake shared static } |