Add patch to fix bug of compile under musl: 0001-Fix-compile-bug-of-musl.patch
Signed-off-by: Wang Mingyu <[email protected]> --- .../procps/0001-Fix-compile-bug-of-musl.patch | 52 +++++++++++++++++++ .../{procps_3.3.16.bb => procps_3.3.17.bb} | 5 +- 2 files changed, 55 insertions(+), 2 deletions(-) create mode 100644 meta/recipes-extended/procps/procps/0001-Fix-compile-bug-of-musl.patch rename meta/recipes-extended/procps/{procps_3.3.16.bb => procps_3.3.17.bb} (95%) diff --git a/meta/recipes-extended/procps/procps/0001-Fix-compile-bug-of-musl.patch b/meta/recipes-extended/procps/procps/0001-Fix-compile-bug-of-musl.patch new file mode 100644 index 0000000000..98186c7d78 --- /dev/null +++ b/meta/recipes-extended/procps/procps/0001-Fix-compile-bug-of-musl.patch @@ -0,0 +1,52 @@ +From 4ceaef8b624042d510492864cb5ee0179452312b Mon Sep 17 00:00:00 2001 +From: Wang Mingyu <[email protected]> +Date: Thu, 4 Mar 2021 17:16:03 +0900 +Subject: [PATCH] Fix compile bug of musl + +It solves the problem that the variable definition cannot be found because the header file cannot be included under musl + +Signed-off-by: Wang Mingyu <[email protected]> +--- + proc/escape.c | 2 +- + w.c | 12 ++++++++---- + 2 files changed, 9 insertions(+), 5 deletions(-) + +diff --git a/proc/escape.c b/proc/escape.c +index 2e8fb7d..21ccdc6 100644 +--- a/proc/escape.c ++++ b/proc/escape.c +@@ -25,7 +25,7 @@ + #include "escape.h" + #include "readproc.h" + +-#if (__GNU_LIBRARY__ >= 6) && (!defined(__UCLIBC__) || defined(__UCLIBC_HAS_WCHAR__)) ++#if (__GNU_LIBRARY__ >= 6) && (!defined(__UCLIBC__) || defined(__UCLIBC_HAS_WCHAR__)) || (DEFAULT_LIBC == LIBC_UCLIBC) + # include <wchar.h> + # include <wctype.h> + # include <stdlib.h> /* MB_CUR_MAX */ +diff --git a/w.c b/w.c +index 9d07ac9..722b612 100644 +--- a/w.c ++++ b/w.c +@@ -56,10 +56,14 @@ + #include <time.h> + #include <unistd.h> + #ifdef HAVE_UTMPX_H +-# include <utmpx.h> +-#else +-# include <utmp.h> +-#endif ++# if HAVE_UTMP_H ++ /* needs utmp.h, for the definition of e.g., UT_HOSTSIZE. */ ++# include <utmp.h> ++# endif ++# include <utmpx.h> ++#elif HAVE_UTMP_H ++# include <utmp.h> ++#endif + #include <arpa/inet.h> + + static int ignoreuser = 0; /* for '-u' */ +-- +2.25.1 + diff --git a/meta/recipes-extended/procps/procps_3.3.16.bb b/meta/recipes-extended/procps/procps_3.3.17.bb similarity index 95% rename from meta/recipes-extended/procps/procps_3.3.16.bb rename to meta/recipes-extended/procps/procps_3.3.17.bb index ef3ac86e97..c1d3fee4d2 100644 --- a/meta/recipes-extended/procps/procps_3.3.16.bb +++ b/meta/recipes-extended/procps/procps_3.3.17.bb @@ -14,8 +14,9 @@ inherit autotools gettext pkgconfig update-alternatives SRC_URI = "git://gitlab.com/procps-ng/procps.git;protocol=https \ file://sysctl.conf \ + file://0001-Fix-compile-bug-of-musl.patch \ " -SRCREV = "59c88e18f29000ceaf7e5f98181b07be443cf12f" +SRCREV = "19a508ea121c0c4ac6d0224575a036de745eaaf8" S = "${WORKDIR}/git" @@ -98,4 +99,4 @@ ALTERNATIVE_LINK_NAME[ps] = "${base_bindir}/ps" ALTERNATIVE_${PN}-sysctl = "sysctl" ALTERNATIVE_TARGET[sysctl] = "${base_sbindir}/sysctl" -ALTERNATIVE_LINK_NAME[sysctl] = "${base_sbindir}/sysctl" \ No newline at end of file +ALTERNATIVE_LINK_NAME[sysctl] = "${base_sbindir}/sysctl" -- 2.25.1
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#148927): https://lists.openembedded.org/g/openembedded-core/message/148927 Mute This Topic: https://lists.openembedded.org/mt/81073688/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
