diff options
author | Chris Packham <judge.packham@gmail.com> | 2021-09-26 07:47:36 (GMT) |
---|---|---|
committer | Chris Packham <judge.packham@gmail.com> | 2021-09-26 07:47:42 (GMT) |
commit | aa524934f5fcfedb91b03d2fec7a8dd4dd080aea (patch) | |
tree | ff5e58ebf6d3aa1fdff5fb1cf9888904f19cd4fa /packages/glibc/2.22 | |
parent | 02d1503f6769be4ad8058b393d4245febced459f (diff) | |
parent | dab2d8011ea67118348a6bd28ae3583960c1b5c3 (diff) |
Merge branch 'remove-obsolete-versions' of https://github.com/cpackham/crosstool-ng
Signed-off-by: Chris Packham <judge.packham@gmail.com>
Diffstat (limited to 'packages/glibc/2.22')
20 files changed, 0 insertions, 1678 deletions
diff --git a/packages/glibc/2.22/0000-sparc32-sem_open-missing-include.patch b/packages/glibc/2.22/0000-sparc32-sem_open-missing-include.patch deleted file mode 100644 index 1153d7b..0000000 --- a/packages/glibc/2.22/0000-sparc32-sem_open-missing-include.patch +++ /dev/null @@ -1,23 +0,0 @@ -commit 3f512ca79fda7854da188df0585e71467119206e -Author: Brett Neumeier <brett@neumeier.us> -Date: Mon Aug 31 15:27:21 2015 -0700 - - Fix non-v9 32-bit sparc build. - - [BZ #18870] - * sysdeps/sparc/sparc32/sem_open.c: Add missing #include - ---- - sysdeps/sparc/sparc32/sem_open.c | 1 + - 1 file changed, 1 insertion(+) - ---- a/sysdeps/sparc/sparc32/sem_open.c -+++ b/sysdeps/sparc/sparc32/sem_open.c -@@ -29,6 +29,7 @@ - #include <sys/mman.h> - #include <sys/stat.h> - #include "semaphoreP.h" -+#include <futex-internal.h> - #include <shm-directory.h> - - diff --git a/packages/glibc/2.22/0001-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch b/packages/glibc/2.22/0001-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch deleted file mode 100644 index 9232b1b..0000000 --- a/packages/glibc/2.22/0001-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch +++ /dev/null @@ -1,75 +0,0 @@ -From df1cf48777fe4cd81ad7fb09ecbe5b31432b7c1c Mon Sep 17 00:00:00 2001 -From: Yvan Roux <yvan.roux@linaro.org> -Date: Fri, 15 Apr 2016 13:29:26 +0200 -Subject: [PATCH] Suppress GCC 6 warning about ambiguous 'else' with - -Wparentheses - ---- - nis/nis_call.c | 20 +++++++++++--------- - stdlib/setenv.c | 24 +++++++++++++----------- - 2 files changed, 24 insertions(+), 20 deletions(-) - ---- a/nis/nis_call.c -+++ b/nis/nis_call.c -@@ -680,16 +680,18 @@ - /* Choose which entry should be evicted from the cache. */ - loc = &nis_server_cache[0]; - if (*loc != NULL) -- for (i = 1; i < 16; ++i) -- if (nis_server_cache[i] == NULL) -- { -+ { -+ for (i = 1; i < 16; ++i) -+ if (nis_server_cache[i] == NULL) -+ { -+ loc = &nis_server_cache[i]; -+ break; -+ } -+ else if ((*loc)->uses > nis_server_cache[i]->uses -+ || ((*loc)->uses == nis_server_cache[i]->uses -+ && (*loc)->expires > nis_server_cache[i]->expires)) - loc = &nis_server_cache[i]; -- break; -- } -- else if ((*loc)->uses > nis_server_cache[i]->uses -- || ((*loc)->uses == nis_server_cache[i]->uses -- && (*loc)->expires > nis_server_cache[i]->expires)) -- loc = &nis_server_cache[i]; -+ } - old = *loc; - *loc = new; - ---- a/stdlib/setenv.c -+++ b/stdlib/setenv.c -@@ -289,18 +289,20 @@ - ep = __environ; - if (ep != NULL) - while (*ep != NULL) -- if (!strncmp (*ep, name, len) && (*ep)[len] == '=') -- { -- /* Found it. Remove this pointer by moving later ones back. */ -- char **dp = ep; -+ { -+ if (!strncmp (*ep, name, len) && (*ep)[len] == '=') -+ { -+ /* Found it. Remove this pointer by moving later ones back. */ -+ char **dp = ep; - -- do -- dp[0] = dp[1]; -- while (*dp++); -- /* Continue the loop in case NAME appears again. */ -- } -- else -- ++ep; -+ do -+ dp[0] = dp[1]; -+ while (*dp++); -+ /* Continue the loop in case NAME appears again. */ -+ } -+ else -+ ++ep; -+ } - - UNLOCK; - diff --git a/packages/glibc/2.22/0002-fix-signed-shift-overlow.patch b/packages/glibc/2.22/0002-fix-signed-shift-overlow.patch deleted file mode 100644 index c7cc330..0000000 --- a/packages/glibc/2.22/0002-fix-signed-shift-overlow.patch +++ /dev/null @@ -1,97 +0,0 @@ -commit 5542236837c5c41435f8282ec92799f480c36f18 -Author: Paul Eggert <eggert@cs.ucla.edu> -Date: Tue Jul 21 22:50:29 2015 -0700 - - Port the 0x7efe...feff pattern to GCC 6. - - See Steve Ellcey's bug report in: - https://sourceware.org/ml/libc-alpha/2015-07/msg00673.html - * string/memrchr.c (MEMRCHR): - * string/rawmemchr.c (RAWMEMCHR): - * string/strchr.c (strchr): - * string/strchrnul.c (STRCHRNUL): - Rewrite code to avoid issues with signed shift overflow. - ---- - string/memrchr.c | 11 ++--------- - string/rawmemchr.c | 11 ++--------- - string/strchr.c | 9 ++------- - string/strchrnul.c | 9 ++------- - 4 files changed, 8 insertions(+), 32 deletions(-) - ---- a/string/memrchr.c -+++ b/string/memrchr.c -@@ -96,15 +96,8 @@ - - The 1-bits make sure that carries propagate to the next 0-bit. - The 0-bits provide holes for carries to fall into. */ -- -- if (sizeof (longword) != 4 && sizeof (longword) != 8) -- abort (); -- --#if LONG_MAX <= LONG_MAX_32_BITS -- magic_bits = 0x7efefeff; --#else -- magic_bits = ((unsigned long int) 0x7efefefe << 32) | 0xfefefeff; --#endif -+ magic_bits = -1; -+ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; - - /* Set up a longword, each of whose bytes is C. */ - charmask = c | (c << 8); ---- a/string/rawmemchr.c -+++ b/string/rawmemchr.c -@@ -86,15 +86,8 @@ - - The 1-bits make sure that carries propagate to the next 0-bit. - The 0-bits provide holes for carries to fall into. */ -- -- if (sizeof (longword) != 4 && sizeof (longword) != 8) -- abort (); -- --#if LONG_MAX <= LONG_MAX_32_BITS -- magic_bits = 0x7efefeff; --#else -- magic_bits = ((unsigned long int) 0x7efefefe << 32) | 0xfefefeff; --#endif -+ magic_bits = -1; -+ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; - - /* Set up a longword, each of whose bytes is C. */ - charmask = c | (c << 8); ---- a/string/strchr.c -+++ b/string/strchr.c -@@ -60,13 +60,8 @@ - - The 1-bits make sure that carries propagate to the next 0-bit. - The 0-bits provide holes for carries to fall into. */ -- switch (sizeof (longword)) -- { -- case 4: magic_bits = 0x7efefeffL; break; -- case 8: magic_bits = ((0x7efefefeL << 16) << 16) | 0xfefefeffL; break; -- default: -- abort (); -- } -+ magic_bits = -1; -+ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; - - /* Set up a longword, each of whose bytes is C. */ - charmask = c | (c << 8); ---- a/string/strchrnul.c -+++ b/string/strchrnul.c -@@ -66,13 +66,8 @@ - - The 1-bits make sure that carries propagate to the next 0-bit. - The 0-bits provide holes for carries to fall into. */ -- switch (sizeof (longword)) -- { -- case 4: magic_bits = 0x7efefeffL; break; -- case 8: magic_bits = ((0x7efefefeL << 16) << 16) | 0xfefefeffL; break; -- default: -- abort (); -- } -+ magic_bits = -1; -+ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; - - /* Set up a longword, each of whose bytes is C. */ - charmask = c | (c << 8); diff --git a/packages/glibc/2.22/0003-dl-openat64-variadic.patch b/packages/glibc/2.22/0003-dl-openat64-variadic.patch deleted file mode 100644 index f57764f..0000000 --- a/packages/glibc/2.22/0003-dl-openat64-variadic.patch +++ /dev/null @@ -1,197 +0,0 @@ -commit 9dd346ff431fc761f1b748bd4da8bb59f7652094 -Author: Joseph Myers <joseph@codesourcery.com> -Date: Tue Oct 20 11:54:09 2015 +0000 - - Convert 113 more function definitions to prototype style (files with assertions). - - This mostly automatically-generated patch converts 113 function - definitions in glibc from old-style K&R to prototype-style. Following - my other recent such patches, this one deals with the case of function - definitions in files that either contain assertions or where grep - suggested they might contain assertions - and thus where it isn't - possible to use a simple object code comparison as a sanity check on - the correctness of the patch, because line numbers are changed. - - A few such automatically-generated changes needed to be supplemented - by manual changes for the result to compile. openat64 had a prototype - declaration with "..." but an old-style definition in - sysdeps/unix/sysv/linux/dl-openat64.c, and "..." needed adding to the - generated prototype in the definition (I've filed - <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68024> for diagnosing - such cases in GCC; the old state was undefined behavior not requiring - a diagnostic, but one seems a good idea). In addition, as Florian has - noted regparm attribute mismatches between declaration and definition - are only diagnosed for prototype definitions, and five functions - needed internal_function added to their definitions (in the case of - __pthread_mutex_cond_lock, via the macro definition of - __pthread_mutex_lock) to compile on i386. - - After this patch is in, remaining old-style definitions are probably - most readily fixed manually before we can turn on - -Wold-style-definition for all builds. - - Tested for x86_64 and x86 (testsuite). - - * crypt/md5-crypt.c (__md5_crypt_r): Convert to prototype-style - function definition. - * crypt/sha256-crypt.c (__sha256_crypt_r): Likewise. - * crypt/sha512-crypt.c (__sha512_crypt_r): Likewise. - * debug/backtracesyms.c (__backtrace_symbols): Likewise. - * elf/dl-minimal.c (_itoa): Likewise. - * hurd/hurdmalloc.c (malloc): Likewise. - (free): Likewise. - (realloc): Likewise. - * inet/inet6_option.c (inet6_option_space): Likewise. - (inet6_option_init): Likewise. - (inet6_option_append): Likewise. - (inet6_option_alloc): Likewise. - (inet6_option_next): Likewise. - (inet6_option_find): Likewise. - * io/ftw.c (FTW_NAME): Likewise. - (NFTW_NAME): Likewise. - (NFTW_NEW_NAME): Likewise. - (NFTW_OLD_NAME): Likewise. - * libio/iofwide.c (_IO_fwide): Likewise. - * libio/strops.c (_IO_str_init_static_internal): Likewise. - (_IO_str_init_static): Likewise. - (_IO_str_init_readonly): Likewise. - (_IO_str_overflow): Likewise. - (_IO_str_underflow): Likewise. - (_IO_str_count): Likewise. - (_IO_str_seekoff): Likewise. - (_IO_str_pbackfail): Likewise. - (_IO_str_finish): Likewise. - * libio/wstrops.c (_IO_wstr_init_static): Likewise. - (_IO_wstr_overflow): Likewise. - (_IO_wstr_underflow): Likewise. - (_IO_wstr_count): Likewise. - (_IO_wstr_seekoff): Likewise. - (_IO_wstr_pbackfail): Likewise. - (_IO_wstr_finish): Likewise. - * locale/programs/localedef.c (normalize_codeset): Likewise. - * locale/programs/locarchive.c (add_locale_to_archive): Likewise. - (add_locales_to_archive): Likewise. - (delete_locales_from_archive): Likewise. - * malloc/malloc.c (__libc_mallinfo): Likewise. - * math/gen-auto-libm-tests.c (init_fp_formats): Likewise. - * misc/tsearch.c (__tfind): Likewise. - * nptl/pthread_attr_destroy.c (__pthread_attr_destroy): Likewise. - * nptl/pthread_attr_getdetachstate.c - (__pthread_attr_getdetachstate): Likewise. - * nptl/pthread_attr_getguardsize.c (pthread_attr_getguardsize): - Likewise. - * nptl/pthread_attr_getinheritsched.c - (__pthread_attr_getinheritsched): Likewise. - * nptl/pthread_attr_getschedparam.c - (__pthread_attr_getschedparam): Likewise. - * nptl/pthread_attr_getschedpolicy.c - (__pthread_attr_getschedpolicy): Likewise. - * nptl/pthread_attr_getscope.c (__pthread_attr_getscope): - Likewise. - * nptl/pthread_attr_getstack.c (__pthread_attr_getstack): - Likewise. - * nptl/pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): - Likewise. - * nptl/pthread_attr_getstacksize.c (__pthread_attr_getstacksize): - Likewise. - * nptl/pthread_attr_init.c (__pthread_attr_init_2_1): Likewise. - (__pthread_attr_init_2_0): Likewise. - * nptl/pthread_attr_setdetachstate.c - (__pthread_attr_setdetachstate): Likewise. - * nptl/pthread_attr_setguardsize.c (pthread_attr_setguardsize): - Likewise. - * nptl/pthread_attr_setinheritsched.c - (__pthread_attr_setinheritsched): Likewise. - * nptl/pthread_attr_setschedparam.c - (__pthread_attr_setschedparam): Likewise. - * nptl/pthread_attr_setschedpolicy.c - (__pthread_attr_setschedpolicy): Likewise. - * nptl/pthread_attr_setscope.c (__pthread_attr_setscope): - Likewise. - * nptl/pthread_attr_setstack.c (__pthread_attr_setstack): - Likewise. - * nptl/pthread_attr_setstackaddr.c (__pthread_attr_setstackaddr): - Likewise. - * nptl/pthread_attr_setstacksize.c (__pthread_attr_setstacksize): - Likewise. - * nptl/pthread_condattr_setclock.c (pthread_condattr_setclock): - Likewise. - * nptl/pthread_create.c (__find_in_stack_list): Likewise. - * nptl/pthread_getattr_np.c (pthread_getattr_np): Likewise. - * nptl/pthread_mutex_cond_lock.c (__pthread_mutex_lock): Define to - use internal_function. - * nptl/pthread_mutex_init.c (__pthread_mutex_init): Convert to - prototype-style function definition. - * nptl/pthread_mutex_lock.c (__pthread_mutex_lock): Likewise. - (__pthread_mutex_cond_lock_adjust): Likewise. Use - internal_function. - * nptl/pthread_mutex_timedlock.c (pthread_mutex_timedlock): - Convert to prototype-style function definition. - * nptl/pthread_mutex_trylock.c (__pthread_mutex_trylock): - Likewise. - * nptl/pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): - Likewise. - (__pthread_mutex_unlock): Likewise. - * nptl_db/td_ta_clear_event.c (td_ta_clear_event): Likewise. - * nptl_db/td_ta_set_event.c (td_ta_set_event): Likewise. - * nptl_db/td_thr_clear_event.c (td_thr_clear_event): Likewise. - * nptl_db/td_thr_event_enable.c (td_thr_event_enable): Likewise. - * nptl_db/td_thr_set_event.c (td_thr_set_event): Likewise. - * nss/makedb.c (process_input): Likewise. - * posix/fnmatch.c (__strchrnul): Likewise. - (__wcschrnul): Likewise. - (fnmatch): Likewise. - * posix/fnmatch_loop.c (FCT): Likewise. - * posix/glob.c (globfree): Likewise. - (__glob_pattern_type): Likewise. - (__glob_pattern_p): Likewise. - * posix/regcomp.c (re_compile_pattern): Likewise. - (re_set_syntax): Likewise. - (re_compile_fastmap): Likewise. - (regcomp): Likewise. - (regerror): Likewise. - (regfree): Likewise. - * posix/regexec.c (regexec): Likewise. - (re_match): Likewise. - (re_search): Likewise. - (re_match_2): Likewise. - (re_search_2): Likewise. - (re_search_stub): Likewise. Use internal_function - (re_copy_regs): Likewise. - (re_set_registers): Convert to prototype-style function - definition. - (prune_impossible_nodes): Likewise. Use internal_function. - * resolv/inet_net_pton.c (inet_net_pton): Convert to - prototype-style function definition. - (inet_net_pton_ipv4): Likewise. - * stdlib/strtod_l.c (____STRTOF_INTERNAL): Likewise. - * sysdeps/pthread/aio_cancel.c (aio_cancel): Likewise. - * sysdeps/pthread/aio_suspend.c (aio_suspend): Likewise. - * sysdeps/pthread/timer_delete.c (timer_delete): Likewise. - * sysdeps/unix/sysv/linux/dl-openat64.c (openat64): Likewise. - Make variadic. - * time/strptime_l.c (localtime_r): Convert to prototype-style - function definition. - * wcsmbs/mbsnrtowcs.c (__mbsnrtowcs): Likewise. - * wcsmbs/mbsrtowcs_l.c (__mbsrtowcs_l): Likewise. - * wcsmbs/wcsnrtombs.c (__wcsnrtombs): Likewise. - * wcsmbs/wcsrtombs.c (__wcsrtombs): Likewise. - ---- - sysdeps/unix/sysv/linux/dl-openat64.c | 5 +---- - 1 file changed, 1 insertion(+), 4 deletions(-) - ---- a/sysdeps/unix/sysv/linux/dl-openat64.c -+++ b/sysdeps/unix/sysv/linux/dl-openat64.c -@@ -23,10 +23,7 @@ - - - int --openat64 (dfd, file, oflag) -- int dfd; -- const char *file; -- int oflag; -+openat64 (int dfd, const char *file, int oflag, ...) - { - assert (!__OPEN_NEEDS_MODE (oflag)); - diff --git a/packages/glibc/2.22/0004-unused-variables.patch b/packages/glibc/2.22/0004-unused-variables.patch deleted file mode 100644 index c9211d6..0000000 --- a/packages/glibc/2.22/0004-unused-variables.patch +++ /dev/null @@ -1,171 +0,0 @@ -commit 6565fcb6e189d67b5a3f321453daebb805056d73 -Author: Wilco Dijkstra <wdijkstr@arm.com> -Date: Fri Sep 18 20:27:20 2015 +0100 - - Fix several build failures with GCC6 due to unused static variables. - - 2015-09-18 Wilco Dijkstra <wdijkstr@arm.com> - - * resolv/base64.c (rcsid): Remove unused static. - * sysdeps/ieee754/dbl-64/atnat2.h (qpi1): Remove unused - static. (tqpi1): Likewise. - * sysdeps/ieee754/dbl-64/uexp.h (one): Likewise. - * sysdeps/ieee754/dbl-64/upow.h (sqrt_2): Likewise. - * sysdeps/ieee754/flt-32/e_log10f.c (one): Likewise. - * sysdeps/ieee754/flt-32/s_cosf.c (one): Likewise. - * sysdeps/ieee754/ldbl-128/e_lgammal_r.c (zero): Likewise. - * sysdeps/ieee754/ldbl-128/s_erfl.c (half): Likewise. - * sysdeps/ieee754/ldbl-128/s_log1pl.c (maxlog): Likewise. - * timezone/private.h (time_t_min): Likewise. (time_t_max): - Likewise. - ---- - resolv/base64.c | 4 ---- - sysdeps/ieee754/dbl-64/atnat2.h | 4 ---- - sysdeps/ieee754/dbl-64/uexp.h | 2 +- - sysdeps/ieee754/dbl-64/upow.h | 2 -- - sysdeps/ieee754/flt-32/e_log10f.c | 2 -- - sysdeps/ieee754/flt-32/s_cosf.c | 2 -- - sysdeps/ieee754/ldbl-128/e_lgammal_r.c | 1 - - sysdeps/ieee754/ldbl-128/s_erfl.c | 1 - - sysdeps/ieee754/ldbl-128/s_log1pl.c | 1 - - timezone/private.h | 10 ---------- - 10 files changed, 1 insertion(+), 28 deletions(-) - ---- a/resolv/base64.c -+++ b/resolv/base64.c -@@ -40,10 +40,6 @@ - * IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES. - */ - --#if !defined(LINT) && !defined(CODECENTER) --static const char rcsid[] = "$BINDId: base64.c,v 8.7 1999/10/13 16:39:33 vixie Exp $"; --#endif /* not lint */ -- - #include <sys/types.h> - #include <sys/param.h> - #include <sys/socket.h> ---- a/sysdeps/ieee754/dbl-64/atnat2.h -+++ b/sysdeps/ieee754/dbl-64/atnat2.h -@@ -65,10 +65,8 @@ - /**/ hpi1 = {{0x3c91a626, 0x33145c07} }, /* pi/2-hpi */ - /**/ mhpi = {{0xbff921fb, 0x54442d18} }, /* -pi/2 */ - /**/ qpi = {{0x3fe921fb, 0x54442d18} }, /* pi/4 */ --/**/ qpi1 = {{0x3c81a626, 0x33145c07} }, /* pi/4-qpi */ - /**/ mqpi = {{0xbfe921fb, 0x54442d18} }, /* -pi/4 */ - /**/ tqpi = {{0x4002d97c, 0x7f3321d2} }, /* 3pi/4 */ --/**/ tqpi1 = {{0x3c9a7939, 0x4c9e8a0a} }, /* 3pi/4-tqpi */ - /**/ mtqpi = {{0xc002d97c, 0x7f3321d2} }, /* -3pi/4 */ - /**/ u1 = {{0x3c314c2a, 0x00000000} }, /* 9.377e-19 */ - /**/ u2 = {{0x3bf955e4, 0x00000000} }, /* 8.584e-20 */ -@@ -129,10 +127,8 @@ - /**/ hpi1 = {{0x33145c07, 0x3c91a626} }, /* pi/2-hpi */ - /**/ mhpi = {{0x54442d18, 0xbff921fb} }, /* -pi/2 */ - /**/ qpi = {{0x54442d18, 0x3fe921fb} }, /* pi/4 */ --/**/ qpi1 = {{0x33145c07, 0x3c81a626} }, /* pi/4-qpi */ - /**/ mqpi = {{0x54442d18, 0xbfe921fb} }, /* -pi/4 */ - /**/ tqpi = {{0x7f3321d2, 0x4002d97c} }, /* 3pi/4 */ --/**/ tqpi1 = {{0x4c9e8a0a, 0x3c9a7939} }, /* 3pi/4-tqpi */ - /**/ mtqpi = {{0x7f3321d2, 0xc002d97c} }, /* -3pi/4 */ - /**/ u1 = {{0x00000000, 0x3c314c2a} }, /* 9.377e-19 */ - /**/ u2 = {{0x00000000, 0x3bf955e4} }, /* 8.584e-20 */ ---- a/sysdeps/ieee754/dbl-64/uexp.h -+++ b/sysdeps/ieee754/dbl-64/uexp.h -@@ -29,7 +29,7 @@ - - #include "mydefs.h" - --const static double one = 1.0, zero = 0.0, hhuge = 1.0e300, tiny = 1.0e-300, -+const static double zero = 0.0, hhuge = 1.0e300, tiny = 1.0e-300, - err_0 = 1.000014, err_1 = 0.000016; - const static int4 bigint = 0x40862002, - badint = 0x40876000,smallint = 0x3C8fffff; ---- a/sysdeps/ieee754/dbl-64/upow.h -+++ b/sysdeps/ieee754/dbl-64/upow.h -@@ -34,7 +34,6 @@ - /**/ nZERO = {{0x80000000, 0}}, /* -0.0 */ - /**/ INF = {{0x7ff00000, 0x00000000}}, /* INF */ - /**/ nINF = {{0xfff00000, 0x00000000}}, /* -INF */ --/**/ sqrt_2 = {{0x3ff6a09e, 0x667f3bcc}}, /* sqrt(2) */ - /**/ ln2a = {{0x3fe62e42, 0xfefa3800}}, /* ln(2) 43 bits */ - /**/ ln2b = {{0x3d2ef357, 0x93c76730}}, /* ln(2)-ln2a */ - /**/ bigu = {{0x4297ffff, 0xfffffd2c}}, /* 1.5*2**42 -724*2**-10 */ -@@ -48,7 +47,6 @@ - /**/ nZERO = {{0, 0x80000000}}, /* -0.0 */ - /**/ INF = {{0x00000000, 0x7ff00000}}, /* INF */ - /**/ nINF = {{0x00000000, 0xfff00000}}, /* -INF */ --/**/ sqrt_2 = {{0x667f3bcc, 0x3ff6a09e}}, /* sqrt(2) */ - /**/ ln2a = {{0xfefa3800, 0x3fe62e42}}, /* ln(2) 43 bits */ - /**/ ln2b = {{0x93c76730, 0x3d2ef357}}, /* ln(2)-ln2a */ - /**/ bigu = {{0xfffffd2c, 0x4297ffff}}, /* 1.5*2**42 -724*2**-10 */ ---- a/sysdeps/ieee754/flt-32/e_log10f.c -+++ b/sysdeps/ieee754/flt-32/e_log10f.c -@@ -22,8 +22,6 @@ - log10_2hi = 3.0102920532e-01, /* 0x3e9a2080 */ - log10_2lo = 7.9034151668e-07; /* 0x355427db */ - --static const float zero = 0.0; -- - float - __ieee754_log10f(float x) - { ---- a/sysdeps/ieee754/flt-32/s_cosf.c -+++ b/sysdeps/ieee754/flt-32/s_cosf.c -@@ -21,8 +21,6 @@ - #include <math.h> - #include <math_private.h> - --static const float one=1.0; -- - #ifndef COSF - # define COSF_FUNC __cosf - #else ---- a/sysdeps/ieee754/ldbl-128/e_lgammal_r.c -+++ b/sysdeps/ieee754/ldbl-128/e_lgammal_r.c -@@ -82,7 +82,6 @@ - static const long double MAXLGM = 1.0485738685148938358098967157129705071571E4928L; - DIAG_POP_NEEDS_COMMENT; - static const long double one = 1.0L; --static const long double zero = 0.0L; - static const long double huge = LDBL_MAX; - - /* log gamma(x) = ( x - 0.5 ) * log(x) - x + LS2PI + 1/x P(1/x^2) ---- a/sysdeps/ieee754/ldbl-128/s_erfl.c -+++ b/sysdeps/ieee754/ldbl-128/s_erfl.c -@@ -140,7 +140,6 @@ - - static const long double - tiny = 1e-4931L, -- half = 0.5L, - one = 1.0L, - two = 2.0L, - /* 2/sqrt(pi) - 1 */ ---- a/sysdeps/ieee754/ldbl-128/s_log1pl.c -+++ b/sysdeps/ieee754/ldbl-128/s_log1pl.c -@@ -117,7 +117,6 @@ - - static const long double sqrth = 0.7071067811865475244008443621048490392848L; - /* ln (2^16384 * (1 - 2^-113)) */ --static const long double maxlog = 1.1356523406294143949491931077970764891253E4L; - static const long double zero = 0.0L; - - long double ---- a/timezone/private.h -+++ b/timezone/private.h -@@ -326,16 +326,6 @@ - #define TYPE_SIGNED(type) (((type) -1) < 0) - #endif /* !defined TYPE_SIGNED */ - --/* The minimum and maximum finite time values. */ --static time_t const time_t_min = -- (TYPE_SIGNED(time_t) -- ? (time_t) -1 << (CHAR_BIT * sizeof (time_t) - 1) -- : 0); --static time_t const time_t_max = -- (TYPE_SIGNED(time_t) -- ? - (~ 0 < 0) - ((time_t) -1 << (CHAR_BIT * sizeof (time_t) - 1)) -- : -1); -- - #ifndef INT_STRLEN_MAXIMUM - /* - ** 302 / 1000 is log10(2.0) rounded up. diff --git a/packages/glibc/2.22/0005-misleading-indentation.patch b/packages/glibc/2.22/0005-misleading-indentation.patch deleted file mode 100644 index 8e08259..0000000 --- a/packages/glibc/2.22/0005-misleading-indentation.patch +++ /dev/null @@ -1,26 +0,0 @@ -commit 976ef870542580cf5fed896c2c652b3e1a95f9da -Author: Steve Ellcey <sellcey@mips.com> -Date: Fri Dec 11 09:19:37 2015 -0800 - - Fix indentation. - - * sysdeps/ieee754/flt-32/k_rem_pio2f.c (__kernel_rem_pio2f): - Fix indentation. - ---- - sysdeps/ieee754/flt-32/k_rem_pio2f.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - ---- a/sysdeps/ieee754/flt-32/k_rem_pio2f.c -+++ b/sysdeps/ieee754/flt-32/k_rem_pio2f.c -@@ -65,7 +65,9 @@ - - /* compute q[0],q[1],...q[jk] */ - for (i=0;i<=jk;i++) { -- for(j=0,fw=0.0;j<=jx;j++) fw += x[j]*f[jx+i-j]; q[i] = fw; -+ for(j=0,fw=0.0;j<=jx;j++) -+ fw += x[j]*f[jx+i-j]; -+ q[i] = fw; - } - - jz = jk; diff --git a/packages/glibc/2.22/0006-cve-2105-7547-getaddrinfo-stack.patch b/packages/glibc/2.22/0006-cve-2105-7547-getaddrinfo-stack.patch deleted file mode 100644 index 504edad..0000000 --- a/packages/glibc/2.22/0006-cve-2105-7547-getaddrinfo-stack.patch +++ /dev/null @@ -1,554 +0,0 @@ ---- - resolv/nss_dns/dns-host.c | 111 ++++++++++++++++++- - resolv/res_query.c | 3 - resolv/res_send.c | 264 ++++++++++++++++++++++++++++++++++------------ - 3 files changed, 309 insertions(+), 69 deletions(-) - ---- a/resolv/nss_dns/dns-host.c -+++ b/resolv/nss_dns/dns-host.c -@@ -1031,7 +1031,10 @@ - int h_namelen = 0; - - if (ancount == 0) -- return NSS_STATUS_NOTFOUND; -+ { -+ *h_errnop = HOST_NOT_FOUND; -+ return NSS_STATUS_NOTFOUND; -+ } - - while (ancount-- > 0 && cp < end_of_message && had_error == 0) - { -@@ -1208,7 +1211,14 @@ - /* Special case here: if the resolver sent a result but it only - contains a CNAME while we are looking for a T_A or T_AAAA record, - we fail with NOTFOUND instead of TRYAGAIN. */ -- return canon == NULL ? NSS_STATUS_TRYAGAIN : NSS_STATUS_NOTFOUND; -+ if (canon != NULL) -+ { -+ *h_errnop = HOST_NOT_FOUND; -+ return NSS_STATUS_NOTFOUND; -+ } -+ -+ *h_errnop = NETDB_INTERNAL; -+ return NSS_STATUS_TRYAGAIN; - } - - -@@ -1222,11 +1232,101 @@ - - enum nss_status status = NSS_STATUS_NOTFOUND; - -+ /* Combining the NSS status of two distinct queries requires some -+ compromise and attention to symmetry (A or AAAA queries can be -+ returned in any order). What follows is a breakdown of how this -+ code is expected to work and why. We discuss only SUCCESS, -+ TRYAGAIN, NOTFOUND and UNAVAIL, since they are the only returns -+ that apply (though RETURN and MERGE exist). We make a distinction -+ between TRYAGAIN (recoverable) and TRYAGAIN' (not-recoverable). -+ A recoverable TRYAGAIN is almost always due to buffer size issues -+ and returns ERANGE in errno and the caller is expected to retry -+ with a larger buffer. -+ -+ Lastly, you may be tempted to make significant changes to the -+ conditions in this code to bring about symmetry between responses. -+ Please don't change anything without due consideration for -+ expected application behaviour. Some of the synthesized responses -+ aren't very well thought out and sometimes appear to imply that -+ IPv4 responses are always answer 1, and IPv6 responses are always -+ answer 2, but that's not true (see the implemetnation of send_dg -+ and send_vc to see response can arrive in any order, particlarly -+ for UDP). However, we expect it holds roughly enough of the time -+ that this code works, but certainly needs to be fixed to make this -+ a more robust implementation. -+ -+ ---------------------------------------------- -+ | Answer 1 Status / | Synthesized | Reason | -+ | Answer 2 Status | Status | | -+ |--------------------------------------------| -+ | SUCCESS/SUCCESS | SUCCESS | [1] | -+ | SUCCESS/TRYAGAIN | TRYAGAIN | [5] | -+ | SUCCESS/TRYAGAIN' | SUCCESS | [1] | -+ | SUCCESS/NOTFOUND | SUCCESS | [1] | -+ | SUCCESS/UNAVAIL | SUCCESS | [1] | -+ | TRYAGAIN/SUCCESS | TRYAGAIN | [2] | -+ | TRYAGAIN/TRYAGAIN | TRYAGAIN | [2] | -+ | TRYAGAIN/TRYAGAIN' | TRYAGAIN | [2] | -+ | TRYAGAIN/NOTFOUND | TRYAGAIN | [2] | -+ | TRYAGAIN/UNAVAIL | TRYAGAIN | [2] | -+ | TRYAGAIN'/SUCCESS | SUCCESS | [3] | -+ | TRYAGAIN'/TRYAGAIN | TRYAGAIN | [3] | -+ | TRYAGAIN'/TRYAGAIN' | TRYAGAIN' | [3] | -+ | TRYAGAIN'/NOTFOUND | TRYAGAIN' | [3] | -+ | TRYAGAIN'/UNAVAIL | UNAVAIL | [3] | -+ | NOTFOUND/SUCCESS | SUCCESS | [3] | -+ | NOTFOUND/TRYAGAIN | TRYAGAIN | [3] | -+ | NOTFOUND/TRYAGAIN' | TRYAGAIN' | [3] | -+ | NOTFOUND/NOTFOUND | NOTFOUND | [3] | -+ | NOTFOUND/UNAVAIL | UNAVAIL | [3] | -+ | UNAVAIL/SUCCESS | UNAVAIL | [4] | -+ | UNAVAIL/TRYAGAIN | UNAVAIL | [4] | -+ | UNAVAIL/TRYAGAIN' | UNAVAIL | [4] | -+ | UNAVAIL/NOTFOUND | UNAVAIL | [4] | -+ | UNAVAIL/UNAVAIL | UNAVAIL | [4] | -+ ---------------------------------------------- -+ -+ [1] If the first response is a success we return success. -+ This ignores the state of the second answer and in fact -+ incorrectly sets errno and h_errno to that of the second -+ answer. However because the response is a success we ignore -+ *errnop and *h_errnop (though that means you touched errno on -+ success). We are being conservative here and returning the -+ likely IPv4 response in the first answer as a success. -+ -+ [2] If the first response is a recoverable TRYAGAIN we return -+ that instead of looking at the second response. The -+ expectation here is that we have failed to get an IPv4 response -+ and should retry both queries. -+ -+ [3] If the first response was not a SUCCESS and the second -+ response is not NOTFOUND (had a SUCCESS, need to TRYAGAIN, -+ or failed entirely e.g. TRYAGAIN' and UNAVAIL) then use the -+ result from the second response, otherwise the first responses -+ status is used. Again we have some odd side-effects when the -+ second response is NOTFOUND because we overwrite *errnop and -+ *h_errnop that means that a first answer of NOTFOUND might see -+ its *errnop and *h_errnop values altered. Whether it matters -+ in practice that a first response NOTFOUND has the wrong -+ *errnop and *h_errnop is undecided. -+ -+ [4] If the first response is UNAVAIL we return that instead of -+ looking at the second response. The expectation here is that -+ it will have failed similarly e.g. configuration failure. -+ -+ [5] Testing this code is complicated by the fact that truncated -+ second response buffers might be returned as SUCCESS if the -+ first answer is a SUCCESS. To fix this we add symmetry to -+ TRYAGAIN with the second response. If the second response -+ is a recoverable error we now return TRYAGIN even if the first -+ response was SUCCESS. */ -+ - if (anslen1 > 0) - status = gaih_getanswer_slice(answer1, anslen1, qname, - &pat, &buffer, &buflen, - errnop, h_errnop, ttlp, - &first); -+ - if ((status == NSS_STATUS_SUCCESS || status == NSS_STATUS_NOTFOUND - || (status == NSS_STATUS_TRYAGAIN - /* We want to look at the second answer in case of an -@@ -1242,8 +1342,15 @@ - &pat, &buffer, &buflen, - errnop, h_errnop, ttlp, - &first); -+ /* Use the second response status in some cases. */ - if (status != NSS_STATUS_SUCCESS && status2 != NSS_STATUS_NOTFOUND) - status = status2; -+ /* Do not return a truncated second response (unless it was -+ unavoidable e.g. unrecoverable TRYAGAIN). */ -+ if (status == NSS_STATUS_SUCCESS -+ && (status2 == NSS_STATUS_TRYAGAIN -+ && *errnop == ERANGE && *h_errnop != NO_RECOVERY)) -+ status = NSS_STATUS_TRYAGAIN; - } - - return status; ---- a/resolv/res_query.c -+++ b/resolv/res_query.c -@@ -396,6 +396,7 @@ - { - free (*answerp2); - *answerp2 = NULL; -+ *nanswerp2 = 0; - *answerp2_malloced = 0; - } - } -@@ -447,6 +448,7 @@ - { - free (*answerp2); - *answerp2 = NULL; -+ *nanswerp2 = 0; - *answerp2_malloced = 0; - } - -@@ -521,6 +523,7 @@ - { - free (*answerp2); - *answerp2 = NULL; -+ *nanswerp2 = 0; - *answerp2_malloced = 0; - } - if (saved_herrno != -1) ---- a/resolv/res_send.c -+++ b/resolv/res_send.c -@@ -1,3 +1,20 @@ -+/* Copyright (C) 2016 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, see -+ <http://www.gnu.org/licenses/>. */ -+ - /* - * Copyright (c) 1985, 1989, 1993 - * The Regents of the University of California. All rights reserved. -@@ -363,6 +380,8 @@ - #ifdef USE_HOOKS - if (__glibc_unlikely (statp->qhook || statp->rhook)) { - if (anssiz < MAXPACKET && ansp) { -+ /* Always allocate MAXPACKET, callers expect -+ this specific size. */ - u_char *buf = malloc (MAXPACKET); - if (buf == NULL) - return (-1); -@@ -638,6 +657,77 @@ - return (struct sockaddr *) (void *) &statp->nsaddr_list[n]; - } - -+/* The send_vc function is responsible for sending a DNS query over TCP -+ to the nameserver numbered NS from the res_state STATP i.e. -+ EXT(statp).nssocks[ns]. The function supports sending both IPv4 and -+ IPv6 queries at the same serially on the same socket. -+ -+ Please note that for TCP there is no way to disable sending both -+ queries, unlike UDP, which honours RES_SNGLKUP and RES_SNGLKUPREOP -+ and sends the queries serially and waits for the result after each -+ sent query. This implemetnation should be corrected to honour these -+ options. -+ -+ Please also note that for TCP we send both queries over the same -+ socket one after another. This technically violates best practice -+ since the server is allowed to read the first query, respond, and -+ then close the socket (to service another client). If the server -+ does this, then the remaining second query in the socket data buffer -+ will cause the server to send the client an RST which will arrive -+ asynchronously and the client's OS will likely tear down the socket -+ receive buffer resulting in a potentially short read and lost -+ response data. This will force the client to retry the query again, -+ and this process may repeat until all servers and connection resets -+ are exhausted and then the query will fail. It's not known if this -+ happens with any frequency in real DNS server implementations. This -+ implementation should be corrected to use two sockets by default for -+ parallel queries. -+ -+ The query stored in BUF of BUFLEN length is sent first followed by -+ the query stored in BUF2 of BUFLEN2 length. Queries are sent -+ serially on the same socket. -+ -+ Answers to the query are stored firstly in *ANSP up to a max of -+ *ANSSIZP bytes. If more than *ANSSIZP bytes are needed and ANSCP -+ is non-NULL (to indicate that modifying the answer buffer is allowed) -+ then malloc is used to allocate a new response buffer and ANSCP and -+ ANSP will both point to the new buffer. If more than *ANSSIZP bytes -+ are needed but ANSCP is NULL, then as much of the response as -+ possible is read into the buffer, but the results will be truncated. -+ When truncation happens because of a small answer buffer the DNS -+ packets header feild TC will bet set to 1, indicating a truncated -+ message and the rest of the socket data will be read and discarded. -+ -+ Answers to the query are stored secondly in *ANSP2 up to a max of -+ *ANSSIZP2 bytes, with the actual response length stored in -+ *RESPLEN2. If more than *ANSSIZP bytes are needed and ANSP2 -+ is non-NULL (required for a second query) then malloc is used to -+ allocate a new response buffer, *ANSSIZP2 is set to the new buffer -+ size and *ANSP2_MALLOCED is set to 1. -+ -+ The ANSP2_MALLOCED argument will eventually be removed as the -+ change in buffer pointer can be used to detect the buffer has -+ changed and that the caller should use free on the new buffer. -+ -+ Note that the answers may arrive in any order from the server and -+ therefore the first and second answer buffers may not correspond to -+ the first and second queries. -+ -+ It is not supported to call this function with a non-NULL ANSP2 -+ but a NULL ANSCP. Put another way, you can call send_vc with a -+ single unmodifiable buffer or two modifiable buffers, but no other -+ combination is supported. -+ -+ It is the caller's responsibility to free the malloc allocated -+ buffers by detecting that the pointers have changed from their -+ original values i.e. *ANSCP or *ANSP2 has changed. -+ -+ If errors are encountered then *TERRNO is set to an appropriate -+ errno value and a zero result is returned for a recoverable error, -+ and a less-than zero result is returned for a non-recoverable error. -+ -+ If no errors are encountered then *TERRNO is left unmodified and -+ a the length of the first response in bytes is returned. */ - static int - send_vc(res_state statp, - const u_char *buf, int buflen, const u_char *buf2, int buflen2, -@@ -647,11 +737,7 @@ - { - const HEADER *hp = (HEADER *) buf; - const HEADER *hp2 = (HEADER *) buf2; -- u_char *ans = *ansp; -- int orig_anssizp = *anssizp; -- // XXX REMOVE -- // int anssiz = *anssizp; -- HEADER *anhp = (HEADER *) ans; -+ HEADER *anhp = (HEADER *) *ansp; - struct sockaddr *nsap = get_nsaddr (statp, ns); - int truncating, connreset, n; - /* On some architectures compiler might emit a warning indicating -@@ -743,6 +829,8 @@ - * Receive length & response - */ - int recvresp1 = 0; -+ /* Skip the second response if there is no second query. -+ To do that we mark the second response as received. */ - int recvresp2 = buf2 == NULL; - uint16_t rlen16; - read_len: -@@ -779,40 +867,14 @@ - u_char **thisansp; - int *thisresplenp; - if ((recvresp1 | recvresp2) == 0 || buf2 == NULL) { -+ /* We have not received any responses -+ yet or we only have one response to -+ receive. */ - thisanssizp = anssizp; - thisansp = anscp ?: ansp; - assert (anscp != NULL || ansp2 == NULL); - thisresplenp = &resplen; - } else { -- if (*anssizp != MAXPACKET) { -- /* No buffer allocated for the first -- reply. We can try to use the rest -- of the user-provided buffer. */ --#if __GNUC_PREREQ (4, 7) -- DIAG_PUSH_NEEDS_COMMENT; -- DIAG_IGNORE_NEEDS_COMMENT (5, "-Wmaybe-uninitialized"); --#endif --#if _STRING_ARCH_unaligned -- *anssizp2 = orig_anssizp - resplen; -- *ansp2 = *ansp + resplen; --#else -- int aligned_resplen -- = ((resplen + __alignof__ (HEADER) - 1) -- & ~(__alignof__ (HEADER) - 1)); -- *anssizp2 = orig_anssizp - aligned_resplen; -- *ansp2 = *ansp + aligned_resplen; --#endif --#if __GNUC_PREREQ (4, 7) -- DIAG_POP_NEEDS_COMMENT; --#endif -- } else { -- /* The first reply did not fit into the -- user-provided buffer. Maybe the second -- answer will. */ -- *anssizp2 = orig_anssizp; -- *ansp2 = *ansp; -- } -- - thisanssizp = anssizp2; - thisansp = ansp2; - thisresplenp = resplen2; -@@ -820,10 +882,14 @@ - anhp = (HEADER *) *thisansp; - - *thisresplenp = rlen; -- if (rlen > *thisanssizp) { -- /* Yes, we test ANSCP here. If we have two buffers -- both will be allocatable. */ -- if (__glibc_likely (anscp != NULL)) { -+ /* Is the answer buffer too small? */ -+ if (*thisanssizp < rlen) { -+ /* If the current buffer is not the the static -+ user-supplied buffer then we can reallocate -+ it. */ -+ if (thisansp != NULL && thisansp != ansp) { -+ /* Always allocate MAXPACKET, callers expect -+ this specific size. */ - u_char *newp = malloc (MAXPACKET); - if (newp == NULL) { - *terrno = ENOMEM; -@@ -835,6 +901,9 @@ - if (thisansp == ansp2) - *ansp2_malloced = 1; - anhp = (HEADER *) newp; -+ /* A uint16_t can't be larger than MAXPACKET -+ thus it's safe to allocate MAXPACKET but -+ read RLEN bytes instead. */ - len = rlen; - } else { - Dprint(statp->options & RES_DEBUG, -@@ -997,6 +1066,66 @@ - return 1; - } - -+/* The send_dg function is responsible for sending a DNS query over UDP -+ to the nameserver numbered NS from the res_state STATP i.e. -+ EXT(statp).nssocks[ns]. The function supports IPv4 and IPv6 queries -+ along with the ability to send the query in parallel for both stacks -+ (default) or serially (RES_SINGLKUP). It also supports serial lookup -+ with a close and reopen of the socket used to talk to the server -+ (RES_SNGLKUPREOP) to work around broken name servers. -+ -+ The query stored in BUF of BUFLEN length is sent first followed by -+ the query stored in BUF2 of BUFLEN2 length. Queries are sent -+ in parallel (default) or serially (RES_SINGLKUP or RES_SNGLKUPREOP). -+ -+ Answers to the query are stored firstly in *ANSP up to a max of -+ *ANSSIZP bytes. If more than *ANSSIZP bytes are needed and ANSCP -+ is non-NULL (to indicate that modifying the answer buffer is allowed) -+ then malloc is used to allocate a new response buffer and ANSCP and -+ ANSP will both point to the new buffer. If more than *ANSSIZP bytes -+ are needed but ANSCP is NULL, then as much of the response as -+ possible is read into the buffer, but the results will be truncated. -+ When truncation happens because of a small answer buffer the DNS -+ packets header feild TC will bet set to 1, indicating a truncated -+ message, while the rest of the UDP packet is discarded. -+ -+ Answers to the query are stored secondly in *ANSP2 up to a max of -+ *ANSSIZP2 bytes, with the actual response length stored in -+ *RESPLEN2. If more than *ANSSIZP bytes are needed and ANSP2 -+ is non-NULL (required for a second query) then malloc is used to -+ allocate a new response buffer, *ANSSIZP2 is set to the new buffer -+ size and *ANSP2_MALLOCED is set to 1. -+ -+ The ANSP2_MALLOCED argument will eventually be removed as the -+ change in buffer pointer can be used to detect the buffer has -+ changed and that the caller should use free on the new buffer. -+ -+ Note that the answers may arrive in any order from the server and -+ therefore the first and second answer buffers may not correspond to -+ the first and second queries. -+ -+ It is not supported to call this function with a non-NULL ANSP2 -+ but a NULL ANSCP. Put another way, you can call send_vc with a -+ single unmodifiable buffer or two modifiable buffers, but no other -+ combination is supported. -+ -+ It is the caller's responsibility to free the malloc allocated -+ buffers by detecting that the pointers have changed from their -+ original values i.e. *ANSCP or *ANSP2 has changed. -+ -+ If an answer is truncated because of UDP datagram DNS limits then -+ *V_CIRCUIT is set to 1 and the return value non-zero to indicate to -+ the caller to retry with TCP. The value *GOTSOMEWHERE is set to 1 -+ if any progress was made reading a response from the nameserver and -+ is used by the caller to distinguish between ECONNREFUSED and -+ ETIMEDOUT (the latter if *GOTSOMEWHERE is 1). -+ -+ If errors are encountered then *TERRNO is set to an appropriate -+ errno value and a zero result is returned for a recoverable error, -+ and a less-than zero result is returned for a non-recoverable error. -+ -+ If no errors are encountered then *TERRNO is left unmodified and -+ a the length of the first response in bytes is returned. */ - static int - send_dg(res_state statp, - const u_char *buf, int buflen, const u_char *buf2, int buflen2, -@@ -1006,8 +1135,6 @@ - { - const HEADER *hp = (HEADER *) buf; - const HEADER *hp2 = (HEADER *) buf2; -- u_char *ans = *ansp; -- int orig_anssizp = *anssizp; - struct timespec now, timeout, finish; - struct pollfd pfd[1]; - int ptimeout; -@@ -1040,6 +1167,8 @@ - int need_recompute = 0; - int nwritten = 0; - int recvresp1 = 0; -+ /* Skip the second response if there is no second query. -+ To do that we mark the second response as received. */ - int recvresp2 = buf2 == NULL; - pfd[0].fd = EXT(statp).nssocks[ns]; - pfd[0].events = POLLOUT; -@@ -1203,55 +1332,56 @@ - int *thisresplenp; - - if ((recvresp1 | recvresp2) == 0 || buf2 == NULL) { -+ /* We have not received any responses -+ yet or we only have one response to -+ receive. */ - thisanssizp = anssizp; - thisansp = anscp ?: ansp; - assert (anscp != NULL || ansp2 == NULL); - thisresplenp = &resplen; - } else { -- if (*anssizp != MAXPACKET) { -- /* No buffer allocated for the first -- reply. We can try to use the rest -- of the user-provided buffer. */ --#if _STRING_ARCH_unaligned -- *anssizp2 = orig_anssizp - resplen; -- *ansp2 = *ansp + resplen; --#else -- int aligned_resplen -- = ((resplen + __alignof__ (HEADER) - 1) -- & ~(__alignof__ (HEADER) - 1)); -- *anssizp2 = orig_anssizp - aligned_resplen; -- *ansp2 = *ansp + aligned_resplen; --#endif -- } else { -- /* The first reply did not fit into the -- user-provided buffer. Maybe the second -- answer will. */ -- *anssizp2 = orig_anssizp; -- *ansp2 = *ansp; -- } -- - thisanssizp = anssizp2; - thisansp = ansp2; - thisresplenp = resplen2; - } - - if (*thisanssizp < MAXPACKET -- /* Yes, we test ANSCP here. If we have two buffers -- both will be allocatable. */ -- && anscp -+ /* If the current buffer is not the the static -+ user-supplied buffer then we can reallocate -+ it. */ -+ && (thisansp != NULL && thisansp != ansp) - #ifdef FIONREAD -+ /* Is the size too small? */ - && (ioctl (pfd[0].fd, FIONREAD, thisresplenp) < 0 - || *thisanssizp < *thisresplenp) - #endif - ) { -+ /* Always allocate MAXPACKET, callers expect -+ this specific size. */ - u_char *newp = malloc (MAXPACKET); - if (newp != NULL) { -- *anssizp = MAXPACKET; -- *thisansp = ans = newp; -+ *thisanssizp = MAXPACKET; -+ *thisansp = newp; - if (thisansp == ansp2) - *ansp2_malloced = 1; - } - } -+ /* We could end up with truncation if anscp was NULL -+ (not allowed to change caller's buffer) and the -+ response buffer size is too small. This isn't a -+ reliable way to detect truncation because the ioctl -+ may be an inaccurate report of the UDP message size. -+ Therefore we use this only to issue debug output. -+ To do truncation accurately with UDP we need -+ MSG_TRUNC which is only available on Linux. We -+ can abstract out the Linux-specific feature in the -+ future to detect truncation. */ -+ if (__glibc_unlikely (*thisanssizp < *thisresplenp)) { -+ Dprint(statp->options & RES_DEBUG, -+ (stdout, ";; response may be truncated (UDP)\n") -+ ); -+ } -+ - HEADER *anhp = (HEADER *) *thisansp; - socklen_t fromlen = sizeof(struct sockaddr_in6); - assert (sizeof(from) <= fromlen); diff --git a/packages/glibc/2.22/0007-Fix-combreloc-test-BSD-grep.patch b/packages/glibc/2.22/0007-Fix-combreloc-test-BSD-grep.patch deleted file mode 100644 index c0be460..0000000 --- a/packages/glibc/2.22/0007-Fix-combreloc-test-BSD-grep.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 61d5f9c09b3157db76bd1a393e248c262a8d9dd4 Mon Sep 17 00:00:00 2001 -From: Alexey Neyman <stilor@att.net> -Date: Wed, 8 Mar 2017 14:31:10 -0800 -Subject: [PATCH] Fix combreloc test with BSD grep - -The test for "-z combreloc" fails when cross-compiling on a machine -that uses BSD grep (e.g. on macos). grep complains about empty -subexpression and exits with non-zero status, which is interpreted -by configure as "not found". As a result, support for "-z combreloc" -(HAVE_Z_COMBRELOC) is not detected, leading to link failure on SPARC. - - * configure.ac: Avoid empty subexpression in grep. - -Signed-off-by: Alexey Neyman <stilor@att.net> ---- - configure | 2 +- - configure.ac | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - ---- a/configure -+++ b/configure -@@ -6172,7 +6172,7 @@ - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } - then -- if $READELF -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then -+ if $READELF -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then - libc_cv_z_combreloc=yes - else - libc_cv_z_combreloc=no ---- a/configure.ac -+++ b/configure.ac -@@ -1442,7 +1442,7 @@ - dnl introducing new options this is not easily doable. Instead use a tool - dnl which always is cross-platform: readelf. To detect whether -z combreloc - dnl look for a section named .rel.dyn. -- if $READELF -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then -+ if $READELF -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then - libc_cv_z_combreloc=yes - else - libc_cv_z_combreloc=no diff --git a/packages/glibc/2.22/0008-typedef-caddr.patch b/packages/glibc/2.22/0008-typedef-caddr.patch deleted file mode 100644 index 980939b..0000000 --- a/packages/glibc/2.22/0008-typedef-caddr.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- - posix/sys/types.h | 3 +++ - 1 file changed, 3 insertions(+) - ---- a/posix/sys/types.h -+++ b/posix/sys/types.h -@@ -113,7 +113,10 @@ - #ifdef __USE_MISC - # ifndef __daddr_t_defined - typedef __daddr_t daddr_t; -+# if ! defined(caddr_t) && ! defined(__caddr_t_defined) - typedef __caddr_t caddr_t; -+# define __caddr_t_defined -+# endif - # define __daddr_t_defined - # endif - #endif diff --git a/packages/glibc/2.22/0009-fix-rpc_parse-format.patch b/packages/glibc/2.22/0009-fix-rpc_parse-format.patch deleted file mode 100644 index 341d541..0000000 --- a/packages/glibc/2.22/0009-fix-rpc_parse-format.patch +++ /dev/null @@ -1,62 +0,0 @@ -commit 5874510faaf3cbd0bb112aaacab9f225002beed1 -Author: Joseph Myers <joseph@codesourcery.com> -Date: Tue Nov 8 23:44:51 2016 +0000 - - Fix rpcgen buffer overrun (bug 20790). - - Building with GCC 7 produces an error building rpcgen: - - rpc_parse.c: In function 'get_prog_declaration': - rpc_parse.c:543:25: error: may write a terminating nul past the end of the destination [-Werror=format-length=] - sprintf (name, "%s%d", ARGNAME, num); /* default name of argument */ - ~~~~^ - rpc_parse.c:543:5: note: format output between 5 and 14 bytes into a destination of size 10 - sprintf (name, "%s%d", ARGNAME, num); /* default name of argument */ - ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - That buffer overrun is for the case where the .x file declares a - program with a million arguments. The strcpy two lines above can - generate a buffer overrun much more simply for a long argument name. - - The limit on length of line read by rpcgen (MAXLINESIZE == 1024) - provides a bound on the buffer size needed, so this patch just changes - the buffer size to MAXLINESIZE to avoid both possible buffer - overruns. A testcase is added that rpcgen does not crash with a - 500-character argument name, where it previously crashed. - - It would not at all surprise me if there are many other ways of - crashing rpcgen with either valid or invalid input; fuzz testing would - likely find various such bugs, though I don't think they are that - important to fix (rpcgen is not that likely to be used with untrusted - .x files as input). (As well as fuzz-findable bugs there are probably - also issues when various int variables get overflowed on very large - input.) The test infrastructure for rpcgen-not-crashing tests would - need extending if tests are to be added for cases where rpcgen should - produce an error, as opposed to cases where it should succeed. - - Tested for x86_64 and x86. - - [BZ #20790] - * sunrpc/rpc_parse.c (get_prog_declaration): Increase buffer size - to MAXLINESIZE. - * sunrpc/bug20790.x: New file. - * sunrpc/Makefile [$(run-built-tests) = yes] (rpcgen-tests): New - variable. - [$(run-built-tests) = yes] (tests-special): Add $(rpcgen-tests). - [$(run-built-tests) = yes] ($(rpcgen-tests)): New rule. - ---- - sunrpc/rpc_parse.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/sunrpc/rpc_parse.c -+++ b/sunrpc/rpc_parse.c -@@ -521,7 +521,7 @@ - get_prog_declaration (declaration * dec, defkind dkind, int num /* arg number */ ) - { - token tok; -- char name[10]; /* argument name */ -+ char name[MAXLINESIZE]; /* argument name */ - - if (dkind == DEF_PROGRAM) - { diff --git a/packages/glibc/2.22/0010-explicit-boolean.patch b/packages/glibc/2.22/0010-explicit-boolean.patch deleted file mode 100644 index ff7cd87..0000000 --- a/packages/glibc/2.22/0010-explicit-boolean.patch +++ /dev/null @@ -1,35 +0,0 @@ -commit e223d1fe72e820d96f43831412ab267a1ace04d0 -Author: steve ellcey-CA Eng-Software <sellcey@sellcey-thinkpad.caveonetworks.com> -Date: Fri Oct 14 12:53:27 2016 -0700 - - Fix warnings from latest GCC. - - * sysdeps/ieee754/dbl-64/e_pow.c (checkint) Make conditions explicitly - boolean. - ---- - sysdeps/ieee754/dbl-64/e_pow.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - ---- a/sysdeps/ieee754/dbl-64/e_pow.c -+++ b/sysdeps/ieee754/dbl-64/e_pow.c -@@ -462,15 +462,15 @@ - return (n & 1) ? -1 : 1; /* odd or even */ - if (k > 20) - { -- if (n << (k - 20)) -+ if (n << (k - 20) != 0) - return 0; /* if not integer */ -- return (n << (k - 21)) ? -1 : 1; -+ return (n << (k - 21) != 0) ? -1 : 1; - } - if (n) - return 0; /*if not integer */ - if (k == 20) - return (m & 1) ? -1 : 1; -- if (m << (k + 12)) -+ if (m << (k + 12) != 0) - return 0; -- return (m << (k + 11)) ? -1 : 1; -+ return (m << (k + 11) != 0) ? -1 : 1; - } diff --git a/packages/glibc/2.22/0011-nis-bogus-conditional.patch b/packages/glibc/2.22/0011-nis-bogus-conditional.patch deleted file mode 100644 index e728368..0000000 --- a/packages/glibc/2.22/0011-nis-bogus-conditional.patch +++ /dev/null @@ -1,64 +0,0 @@ -commit f88759ea9bd3c8d8fef28f123ba9767cb0e421a3 -Author: Joseph Myers <joseph@codesourcery.com> -Date: Wed Dec 21 23:44:01 2016 +0000 - - Fix nss_nisplus build with mainline GCC (bug 20978). - - glibc build with current mainline GCC fails because - nis/nss_nisplus/nisplus-alias.c contains code - - if (name != NULL) - { - *errnop = EINVAL; - return NSS_STATUS_UNAVAIL; - } - - char buf[strlen (name) + 9 + tablename_len]; - - producing an error about strlen being called on a pointer that is - always NULL (and a subsequent use of that pointer with a %s format in - snprintf). - - As Andreas noted, the bogus conditional comes from a 1997 change: - - - if (name == NULL || strlen(name) > 8) - - return NSS_STATUS_NOTFOUND; - - else - + if (name != NULL || strlen(name) <= 8) - - So the intention is clearly to return an error for NULL name. - - This patch duly inverts the sense of the conditional. It fixes the - build with GCC mainline, and passes usual glibc testsuite testing for - x86_64. However, I have not tried any actual substantive nisplus - testing, do not have an environment for such testing, and do not know - whether it is possible that strlen (name) or tablename_len might be - large so that the VLA for buf is actually a security issue. However, - if it is a security issue, there are plenty of other similar instances - in the nisplus code (that haven't been hidden by a bogus comparison - with NULL) - and nis_table.c:__create_ib_request uses strdupa on the - string passed to nis_list, so a local fix in the caller wouldn't - suffice anyway (see bug 20987). (Calls to strdupa and other such - macros that use alloca must be considered equally questionable - regarding stack overflow issues as direct calls to alloca and VLA - declarations.) - - [BZ #20978] - * nis/nss_nisplus/nisplus-alias.c (_nss_nisplus_getaliasbyname_r): - Compare name == NULL, not name != NULL. - ---- - nis/nss_nisplus/nisplus-alias.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/nis/nss_nisplus/nisplus-alias.c -+++ b/nis/nss_nisplus/nisplus-alias.c -@@ -291,7 +291,7 @@ - return status; - } - -- if (name != NULL) -+ if (name == NULL) - { - *errnop = EINVAL; - return NSS_STATUS_UNAVAIL; diff --git a/packages/glibc/2.22/0012-strftime-multiple-stmts.patch b/packages/glibc/2.22/0012-strftime-multiple-stmts.patch deleted file mode 100644 index 0f97e7d..0000000 --- a/packages/glibc/2.22/0012-strftime-multiple-stmts.patch +++ /dev/null @@ -1,73 +0,0 @@ -commit e4043b84c49e1cf9bcf1e8320233343ecc34f8eb -Author: Joseph Myers <joseph@codesourcery.com> -Date: Tue Jun 27 17:12:13 2017 +0000 - - Fix strftime build with GCC 8. - - Building with current GCC mainline fails with: - - strftime_l.c: In function '__strftime_internal': - strftime_l.c:719:4: error: macro expands to multiple statements [-Werror=multistatement-macros] - digits = d > width ? d : width; \ - ^ - strftime_l.c:1260:6: note: in expansion of macro 'DO_NUMBER' - DO_NUMBER (1, tp->tm_year + TM_YEAR_BASE); - ^~~~~~~~~ - strftime_l.c:1259:4: note: some parts of macro expansion are not guarded by this 'else' clause - else - ^~~~ - - In fact this particular instance is harmless; the code looks like: - - if (modifier == L_('O')) - goto bad_format; - else - DO_NUMBER (1, tp->tm_year + TM_YEAR_BASE); - - and because of the goto, it doesn't matter that part of the expansion - isn't under the "else" conditional. But it's also clearly bad style - to rely on that. This patch changes DO_NUMBER and DO_NUMBER_SPACEPAD - to use do { } while (0) to avoid such problems. - - Tested (full testsuite) for x86_64 (GCC 6), and with - build-many-glibcs.py with GCC mainline, in conjunction with my libgcc - patch <https://gcc.gnu.org/ml/gcc-patches/2017-06/msg02032.html>. - - * time/strftime_l.c (DO_NUMBER): Define using do { } while (0). - (DO_NUMBER_SPACEPAD): Likewise. - ---- - time/strftime_l.c | 22 ++++++++++++++++------ - 1 file changed, 16 insertions(+), 6 deletions(-) - ---- a/time/strftime_l.c -+++ b/time/strftime_l.c -@@ -738,12 +738,22 @@ - format_char = *f; - switch (format_char) - { --#define DO_NUMBER(d, v) \ -- digits = d > width ? d : width; \ -- number_value = v; goto do_number --#define DO_NUMBER_SPACEPAD(d, v) \ -- digits = d > width ? d : width; \ -- number_value = v; goto do_number_spacepad -+#define DO_NUMBER(d, v) \ -+ do \ -+ { \ -+ digits = d > width ? d : width; \ -+ number_value = v; \ -+ goto do_number; \ -+ } \ -+ while (0) -+#define DO_NUMBER_SPACEPAD(d, v) \ -+ do \ -+ { \ -+ digits = d > width ? d : width; \ -+ number_value = v; \ -+ goto do_number_spacepad; \ -+ } \ -+ while (0) - - case L_('%'): - if (modifier != 0) diff --git a/packages/glibc/2.22/0013-if_nametoindex-size-check.patch b/packages/glibc/2.22/0013-if_nametoindex-size-check.patch deleted file mode 100644 index 7976fdd..0000000 --- a/packages/glibc/2.22/0013-if_nametoindex-size-check.patch +++ /dev/null @@ -1,29 +0,0 @@ -commit 2180fee114b778515b3f560e5ff1e795282e60b0 -Author: Steve Ellcey <sellcey@caviumnetworks.com> -Date: Wed Nov 15 08:58:48 2017 -0800 - - Check length of ifname before copying it into to ifreq structure. - - [BZ #22442] - * sysdeps/unix/sysv/linux/if_index.c (__if_nametoindex): - Check if ifname is too long. - ---- - sysdeps/unix/sysv/linux/if_index.c | 6 ++++++ - 1 file changed, 6 insertions(+) - ---- a/sysdeps/unix/sysv/linux/if_index.c -+++ b/sysdeps/unix/sysv/linux/if_index.c -@@ -43,6 +43,12 @@ - if (fd < 0) - return 0; - -+ if (strlen (ifname) >= IFNAMSIZ) -+ { -+ __set_errno (ENODEV); -+ return 0; -+ } -+ - strncpy (ifr.ifr_name, ifname, sizeof (ifr.ifr_name)); - if (__ioctl (fd, SIOCGIFINDEX, &ifr) < 0) - { diff --git a/packages/glibc/2.22/0014-utmp-nonstring.patch b/packages/glibc/2.22/0014-utmp-nonstring.patch deleted file mode 100644 index 98f142c..0000000 --- a/packages/glibc/2.22/0014-utmp-nonstring.patch +++ /dev/null @@ -1,80 +0,0 @@ -commit 7532837d7b03b3ca5b9a63d77a5bd81dd23f3d9c -Author: Martin Sebor <msebor@redhat.com> -Date: Wed Nov 15 17:39:59 2017 -0700 - - The -Wstringop-truncation option new in GCC 8 detects common misuses - of the strncat and strncpy function that may result in truncating - the copied string before the terminating NUL. To avoid false positive - warnings for correct code that intentionally creates sequences of - characters that aren't guaranteed to be NUL-terminated, arrays that - are intended to store such sequences should be decorated with a new - nonstring attribute. This change add this attribute to Glibc and - uses it to suppress such false positives. - - ChangeLog: - * misc/sys/cdefs.h (__attribute_nonstring__): New macro. - * sysdeps/gnu/bits/utmp.h (struct utmp): Use it. - * sysdeps/unix/sysv/linux/s390/bits/utmp.h (struct utmp): Same. - ---- - misc/sys/cdefs.h | 9 +++++++++ - sysdeps/gnu/bits/utmp.h | 9 ++++++--- - sysdeps/unix/sysv/linux/s390/bits/utmp.h | 9 ++++++--- - 3 files changed, 21 insertions(+), 6 deletions(-) - ---- a/misc/sys/cdefs.h -+++ b/misc/sys/cdefs.h -@@ -399,6 +399,15 @@ - # endif - #endif - -+#if __GNUC_PREREQ (8, 0) -+/* Describes a char array whose address can safely be passed as the first -+ argument to strncpy and strncat, as the char array is not necessarily -+ a NUL-terminated string. */ -+# define __attribute_nonstring__ __attribute__ ((__nonstring__)) -+#else -+# define __attribute_nonstring__ -+#endif -+ - #if (!defined _Static_assert && !defined __cplusplus \ - && (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) < 201112 \ - && (!__GNUC_PREREQ (4, 6) || defined __STRICT_ANSI__)) ---- a/sysdeps/gnu/bits/utmp.h -+++ b/sysdeps/gnu/bits/utmp.h -@@ -59,10 +59,13 @@ - { - short int ut_type; /* Type of login. */ - pid_t ut_pid; /* Process ID of login process. */ -- char ut_line[UT_LINESIZE]; /* Devicename. */ -+ char ut_line[UT_LINESIZE] -+ __attribute_nonstring__; /* Devicename. */ - char ut_id[4]; /* Inittab ID. */ -- char ut_user[UT_NAMESIZE]; /* Username. */ -- char ut_host[UT_HOSTSIZE]; /* Hostname for remote login. */ -+ char ut_user[UT_NAMESIZE] -+ __attribute_nonstring__; /* Username. */ -+ char ut_host[UT_HOSTSIZE] -+ __attribute_nonstring__; /* Hostname for remote login. */ - struct exit_status ut_exit; /* Exit status of a process marked - as DEAD_PROCESS. */ - /* The ut_session and ut_tv fields must be the same size when compiled ---- a/sysdeps/unix/sysv/linux/s390/bits/utmp.h -+++ b/sysdeps/unix/sysv/linux/s390/bits/utmp.h -@@ -59,10 +59,13 @@ - { - short int ut_type; /* Type of login. */ - pid_t ut_pid; /* Process ID of login process. */ -- char ut_line[UT_LINESIZE]; /* Devicename. */ -+ char ut_line[UT_LINESIZE] -+ __attribute_nonstring__; /* Devicename. */ - char ut_id[4]; /* Inittab ID. */ -- char ut_user[UT_NAMESIZE]; /* Username. */ -- char ut_host[UT_HOSTSIZE]; /* Hostname for remote login. */ -+ char ut_user[UT_NAMESIZE] -+ __attribute_nonstring__; /* Username. */ -+ char ut_host[UT_HOSTSIZE] -+ __attribute_nonstring__; /* Hostname for remote login. */ - struct exit_status ut_exit; /* Exit status of a process marked - as DEAD_PROCESS. */ - /* The ut_session and ut_tv fields must be the same size when compiled diff --git a/packages/glibc/2.22/0015-getlogin_r-use-strnlen.patch b/packages/glibc/2.22/0015-getlogin_r-use-strnlen.patch deleted file mode 100644 index ff19964..0000000 --- a/packages/glibc/2.22/0015-getlogin_r-use-strnlen.patch +++ /dev/null @@ -1,47 +0,0 @@ -commit 4bae615022cb5a5da79ccda83cc6c9ba9f2d479c -Author: Joseph Myers <joseph@codesourcery.com> -Date: Wed Nov 22 18:44:23 2017 +0000 - - Avoid use of strlen in getlogin_r (bug 22447). - - Building glibc with current mainline GCC fails, among other reasons, - because of an error for use of strlen on the nonstring ut_user field. - This patch changes the problem code in getlogin_r to use __strnlen - instead. It also needs to set the trailing NUL byte of the result - explicitly, because of the case where ut_user does not have such a - trailing NUL byte (but the result should always have one). - - Tested for x86_64. Also tested that, in conjunction with - <https://sourceware.org/ml/libc-alpha/2017-11/msg00797.html>, it fixes - the build for arm with mainline GCC. - - [BZ #22447] - * sysdeps/unix/getlogin_r.c (__getlogin_r): Use __strnlen not - strlen to compute length of ut_user and set trailing NUL byte of - result explicitly. - ---- - sysdeps/unix/getlogin_r.c | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - ---- a/sysdeps/unix/getlogin_r.c -+++ b/sysdeps/unix/getlogin_r.c -@@ -82,7 +82,7 @@ - - if (result == 0) - { -- size_t needed = strlen (ut->ut_user) + 1; -+ size_t needed = __strnlen (ut->ut_user, UT_NAMESIZE) + 1; - - if (needed > name_len) - { -@@ -91,7 +91,8 @@ - } - else - { -- memcpy (name, ut->ut_user, needed); -+ memcpy (name, ut->ut_user, needed - 1); -+ name[needed - 1] = 0; - result = 0; - } - } diff --git a/packages/glibc/2.22/0016-zic.c-use-memcpy.patch b/packages/glibc/2.22/0016-zic.c-use-memcpy.patch deleted file mode 100644 index ef768aa..0000000 --- a/packages/glibc/2.22/0016-zic.c-use-memcpy.patch +++ /dev/null @@ -1,25 +0,0 @@ -commit e69897bf202e18034cbef26f363bae64de70a196 -Author: Paul Eggert <eggert@cs.ucla.edu> -Date: Sun Nov 12 22:00:28 2017 -0800 - - timezone: pacify GCC -Wstringop-truncation - - Problem reported by Martin Sebor in: - https://sourceware.org/ml/libc-alpha/2017-11/msg00336.html - * timezone/zic.c (writezone): Use memcpy, not strncpy. - ---- - timezone/zic.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/timezone/zic.c -+++ b/timezone/zic.c -@@ -1713,7 +1713,7 @@ - } - #define DO(field) ((void) fwrite(tzh.field, sizeof tzh.field, 1, fp)) - tzh = tzh0; -- (void) strncpy(tzh.tzh_magic, TZ_MAGIC, sizeof tzh.tzh_magic); -+ memcpy(tzh.tzh_magic, TZ_MAGIC, sizeof tzh.tzh_magic); - tzh.tzh_version[0] = version; - convert(thistypecnt, tzh.tzh_ttisgmtcnt); - convert(thistypecnt, tzh.tzh_ttisstdcnt); diff --git a/packages/glibc/2.22/0017-Fix-cmpli-usage-in-power6-memset.patch b/packages/glibc/2.22/0017-Fix-cmpli-usage-in-power6-memset.patch deleted file mode 100644 index 5213378..0000000 --- a/packages/glibc/2.22/0017-Fix-cmpli-usage-in-power6-memset.patch +++ /dev/null @@ -1,49 +0,0 @@ -Author: Joseph Myers <joseph@codesourcery.com> -Date: 2016-10-24 - -Building glibc for powerpc64 with recent (2.27.51.20161012) binutils, -with multi-arch enabled, I get the error: - -../sysdeps/powerpc/powerpc64/power6/memset.S: Assembler messages: -../sysdeps/powerpc/powerpc64/power6/memset.S:254: Error: operand out of range (5 is not between 0 and 1) -../sysdeps/powerpc/powerpc64/power6/memset.S:254: Error: operand out of range (128 is not between 0 and 31) -../sysdeps/powerpc/powerpc64/power6/memset.S:254: Error: missing operand - -Indeed, cmpli is documented as a four-operand instruction, and looking -at nearby code it seems likely cmpldi was intended. This patch fixes -this powerpc64 code accordingly, and makes a corresponding change to -the powerpc32 code. - -Note: this patch is not tested beyond verifying that the powerpc64 -code builds where it failed to build before the patch. In particular, -I have not done execution testing (the systems I usually use for -testing powerpc are pre-power6 so wouldn't use this code) or tested -the powerpc32 change. - ---- - sysdeps/powerpc/powerpc32/power6/memset.S (memset): Use cmplwi instead of cmpli. - sysdeps/powerpc/powerpc64/power6/memset.S (memset): Use cmpldi instead of cmpli. - ---- a/sysdeps/powerpc/powerpc32/power6/memset.S -+++ b/sysdeps/powerpc/powerpc32/power6/memset.S -@@ -394,7 +394,7 @@ L(cacheAlignedx): - /* A simple loop for the longer (>640 bytes) lengths. This form limits - the branch miss-predicted to exactly 1 at loop exit.*/ - L(cacheAligned512): -- cmpli cr1,rLEN,128 -+ cmplwi cr1,rLEN,128 - blt cr1,L(cacheAligned1) - dcbz 0,rMEMP - addi rLEN,rLEN,-128 - ---- a/sysdeps/powerpc/powerpc64/power6/memset.S -+++ b/sysdeps/powerpc/powerpc64/power6/memset.S -@@ -251,7 +251,7 @@ L(cacheAlignedx): - /* A simple loop for the longer (>640 bytes) lengths. This form limits - the branch miss-predicted to exactly 1 at loop exit.*/ - L(cacheAligned512): -- cmpli cr1,rLEN,128 -+ cmpldi cr1,rLEN,128 - blt cr1,L(cacheAligned1) - dcbz 0,rMEMP - addi rLEN,rLEN,-128 diff --git a/packages/glibc/2.22/chksum b/packages/glibc/2.22/chksum deleted file mode 100644 index 1ddffaf..0000000 --- a/packages/glibc/2.22/chksum +++ /dev/null @@ -1,12 +0,0 @@ -md5 glibc-2.22.tar.xz e51e02bf552a0a1fbbdc948fb2f5e83c -sha1 glibc-2.22.tar.xz 5be95334f197121d8b351059a1c6518305d88e2a -sha256 glibc-2.22.tar.xz eb731406903befef1d8f878a46be75ef862b9056ab0cde1626d08a7a05328948 -sha512 glibc-2.22.tar.xz a8719f3a4f8aa5fa81711116fdafbea5082c6dfd85bd8c4cdce60571910263ab422b35bb8b55a84d37ccb146442133ba60a84d453ca4a439c8ccd35419bd051b -md5 glibc-2.22.tar.bz2 3168120497c81b663a76c952f7722da2 -sha1 glibc-2.22.tar.bz2 2c0b9114b10b31c9c064f03e00bfeaecd3983eef -sha256 glibc-2.22.tar.bz2 c64b6fcae5945abbb9cb40c583bab9d7a827943203beb3dda1aeeed3b5e404c1 -sha512 glibc-2.22.tar.bz2 b786546b43b8ac69b18e1f4f74651b2d90253a3ae9f7b796b9cfb0b28b8c405747136f10b3ada14bb7b33f7c951985db6cef171a5e033393ebdead5985332d65 -md5 glibc-2.22.tar.gz 91dcaa30870c1ce5c9974c49c3af03eb -sha1 glibc-2.22.tar.gz 802c4522316005b3fee4605243c3249cfbfa7017 -sha256 glibc-2.22.tar.gz a62610c4084a0fd8cec58eee12ef9e61fdf809c31e7cecbbc28feb8719f08be5 -sha512 glibc-2.22.tar.gz 9f7905d6aae05481b2253c71d5b6e67797904cc64a26b2aafc42c7e94bd4078be16a7837314aa36e311d409aa75d80f1df9d9e170b8c8768ee82e3adf355b973 diff --git a/packages/glibc/2.22/version.desc b/packages/glibc/2.22/version.desc deleted file mode 100644 index fcfe389..0000000 --- a/packages/glibc/2.22/version.desc +++ /dev/null @@ -1 +0,0 @@ -obsolete='yes' |