diff options
author | Alexey Neyman <stilor@att.net> | 2018-05-15 23:41:28 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-15 23:41:28 (GMT) |
commit | d274ab06fe807b2a85223391de9aa484e9bbff08 (patch) | |
tree | 3de1fc2aadf622ce02226f254d908d39e25e3988 /packages/glibc/2.25/0011-zic.c-use-memcpy.patch | |
parent | 844c83cac209ca7f99684dee14f1c3d64c6ee27e (diff) | |
parent | 37ac0e8474883ce9202ef4e08b7d9f9f66ea8a5d (diff) |
Merge pull request #967 from stilor/fix-building-older-glibc
Fix building older glibc
Diffstat (limited to 'packages/glibc/2.25/0011-zic.c-use-memcpy.patch')
-rw-r--r-- | packages/glibc/2.25/0011-zic.c-use-memcpy.patch | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/packages/glibc/2.25/0011-zic.c-use-memcpy.patch b/packages/glibc/2.25/0011-zic.c-use-memcpy.patch new file mode 100644 index 0000000..96d0f1d --- /dev/null +++ b/packages/glibc/2.25/0011-zic.c-use-memcpy.patch @@ -0,0 +1,25 @@ +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 +@@ -1819,7 +1819,7 @@ + } + #define DO(field) fwrite(tzh.field, sizeof tzh.field, 1, fp) + tzh = tzh0; +- 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); |