From ca9627e70852f6b2e835660df870fe3ab405882d Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Sun, 1 Sep 2019 00:00:32 +0200 Subject: Initial import --- .../util-linux/files/util-linux-2.13-uclibc.patch | 71 ++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 sys-apps/util-linux/files/util-linux-2.13-uclibc.patch (limited to 'sys-apps/util-linux/files/util-linux-2.13-uclibc.patch') diff --git a/sys-apps/util-linux/files/util-linux-2.13-uclibc.patch b/sys-apps/util-linux/files/util-linux-2.13-uclibc.patch new file mode 100644 index 0000000..237e126 --- /dev/null +++ b/sys-apps/util-linux/files/util-linux-2.13-uclibc.patch @@ -0,0 +1,71 @@ +--- login-utils/agetty.c ++++ login-utils/agetty.c +@@ -884,7 +884,7 @@ + + case 'o': + { +- char domainname[HOST_NAME_MAX+1]; ++ char domainname[HOSTNAME_LENGTH+1]; + #ifdef HAVE_GETDOMAINNAME + if (getdomainname(domainname, sizeof(domainname))) + #endif +@@ -897,7 +897,7 @@ + case 'O': + { + char *dom = "unknown_domain"; +- char host[HOST_NAME_MAX + 1]; ++ char host[HOSTNAME_LENGTH + 1]; + struct addrinfo hints, *info = NULL; + + memset(&hints, 0, sizeof(hints)); +@@ -992,7 +992,7 @@ + } + #endif + { +- char hn[HOST_NAME_MAX+1]; ++ char hn[HOSTNAME_LENGTH+1]; + if (gethostname(hn, sizeof(hn)) == 0) + write(1, hn, strlen(hn)); + } +--- configure ++++ configure +@@ -7663,7 +7663,10 @@ + main () + { + +-int test = SYS_sched_getaffinity; ++#if defined(__UCLIBC__) && __UCLIBC_SUBLEVEL__ <= 28 ++#error taskset unusable ++#endif ++int test = SYS_sched_getaffinity; + + ; + return 0; +--- sys-utils/setarch.c ++++ sys-utils/setarch.c +@@ -39,6 +39,10 @@ + #include + #include "nls.h" + ++#if defined(__UCLIBC__) && __UCLIBC_SUBLEVEL__ <= 28 ++static const char *program_invocation_short_name; ++#endif ++ + #define set_pers(pers) ((long)syscall(SYS_personality, pers)) + + struct { +@@ -184,6 +188,14 @@ + bindtextdomain(PACKAGE, LOCALEDIR); + textdomain(PACKAGE); + ++#if defined(__UCLIBC__) && __UCLIBC_SUBLEVEL__ <= 28 ++ program_invocation_short_name = strrchr(argv[0],'/'); ++ if (program_invocation_short_name) ++ program_invocation_short_name++; ++ else ++ program_invocation_short_name = argv[0]; ++#endif ++ + if (argc < 1) + show_usage(_("Not enough arguments")); + -- cgit v1.2.3