From 4b7e12986f31cf28336407eb251c228f4ad8f353 Mon Sep 17 00:00:00 2001 From: Ferry Toth Date: Fri, 11 Jan 2019 22:05:13 +0100 Subject: [PATCH] Revert me: patches to make build on Ubuntu Cosmic 18.10 Signed-off-by: Ferry Toth --- .../conf/distro/poky-edison.conf | 1 - setup.sh | 3 + ...ison-Fix-build-break-with-glibc-2.28.patch | 58 ++++++ ...tils-Fix-build-break-with-glibc-2.28.patch | 189 ++++++++++++++++++ utils/0001-PATCH-cross-localedef.patch | 106 ++++++++++ 5 files changed, 356 insertions(+), 1 deletion(-) create mode 100644 utils/0001-PATCH-bison-Fix-build-break-with-glibc-2.28.patch create mode 100644 utils/0001-PATCH-coreutils-Fix-build-break-with-glibc-2.28.patch create mode 100644 utils/0001-PATCH-cross-localedef.patch diff --git a/meta-intel-edison-distro/conf/distro/poky-edison.conf b/meta-intel-edison-distro/conf/distro/poky-edison.conf index 474d8241..861e78a2 100644 --- a/meta-intel-edison-distro/conf/distro/poky-edison.conf +++ b/meta-intel-edison-distro/conf/distro/poky-edison.conf @@ -7,7 +7,6 @@ PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot" PREFERRED_VERSION_u-boot ?= "2018.09" PREFERRED_VERSION_u-boot-fw-utils ?= "2018.09" PREFERRED_VERSION_pulseaudio ?= "11.1%" -PREFERRED_VERSION_openssl ?= "1.1.0%" PREFERRED_VERSION_systemd ?= "237%" PREFERRED_VERSION_nodejs = "8.%" PREFERRED_VERSION_nodejs-native = "8.%" diff --git a/setup.sh b/setup.sh index 10f27b79..1e88210d 100755 --- a/setup.sh +++ b/setup.sh @@ -342,6 +342,9 @@ COPYLEFT_LICENSE_INCLUDE = 'GPL* LGPL*' cd $mingw_dir git apply $top_repo_dir/meta-intel-edison/utils/0001-Enable-SDKTAROPTS.patch cd $poky_dir + git apply --whitespace=nowarn $top_repo_dir/meta-intel-edison/utils/0001-PATCH-bison-Fix-build-break-with-glibc-2.28.patch + git apply --whitespace=nowarn $top_repo_dir/meta-intel-edison/utils/0001-PATCH-coreutils-Fix-build-break-with-glibc-2.28.patch + git apply --whitespace=nowarn $top_repo_dir/meta-intel-edison/utils/0001-PATCH-cross-localedef.patch if [[ $my_sdk_host == win* ]] then diff --git a/utils/0001-PATCH-bison-Fix-build-break-with-glibc-2.28.patch b/utils/0001-PATCH-bison-Fix-build-break-with-glibc-2.28.patch new file mode 100644 index 00000000..c146259e --- /dev/null +++ b/utils/0001-PATCH-bison-Fix-build-break-with-glibc-2.28.patch @@ -0,0 +1,58 @@ +From e2b7828a4bc6a73369ef33356545267fb6dbf438 Mon Sep 17 00:00:00 2001 +From: Ferry Toth +Date: Fri, 11 Jan 2019 13:03:27 +0100 +Subject: [PATCH] [PATCH] bison: Fix build break with glibc 2.28 + +(From OE-Core rev: 741415c58b3565764000028c26efd081212eb989) + +Signed-off-by: Khem Raj +Signed-off-by: Richard Purdie +Signed-off-by: Ferry Toth +--- + .../recipes-devtools/bison/bison/gnulib.patch | 21 +++++++++++++++++++ + meta/recipes-devtools/bison/bison_3.0.4.bb | 1 + + 2 files changed, 22 insertions(+) + create mode 100644 meta/recipes-devtools/bison/bison/gnulib.patch + +diff --git a/meta/recipes-devtools/bison/bison/gnulib.patch b/meta/recipes-devtools/bison/bison/gnulib.patch +new file mode 100644 +index 0000000000..7eaf0ce0fa +--- /dev/null ++++ b/meta/recipes-devtools/bison/bison/gnulib.patch +@@ -0,0 +1,21 @@ ++Fix gnulib issues found with glibc 2.28 libio.h removal ++ ++see ++https://lists.gnu.org/r/bug-gnulib/2018-03/msg00000.html ++ ++Upstream-Status: Pending ++Signed-off-by: Khem Raj ++ ++Index: bison-3.0.4/lib/fseterr.c ++=================================================================== ++--- bison-3.0.4.orig/lib/fseterr.c +++++ bison-3.0.4/lib/fseterr.c ++@@ -29,7 +29,7 @@ fseterr (FILE *fp) ++ /* Most systems provide FILE as a struct and the necessary bitmask in ++ , because they need it for implementing getc() and putc() as ++ fast macros. */ ++-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ +++#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ ++ fp->_flags |= _IO_ERR_SEEN; ++ #elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin */ ++ fp_->_flags |= __SERR; +diff --git a/meta/recipes-devtools/bison/bison_3.0.4.bb b/meta/recipes-devtools/bison/bison_3.0.4.bb +index 58728f5021..cc155f0fbe 100644 +--- a/meta/recipes-devtools/bison/bison_3.0.4.bb ++++ b/meta/recipes-devtools/bison/bison_3.0.4.bb +@@ -14,6 +14,7 @@ SRC_URI = "${GNU_MIRROR}/bison/bison-${PV}.tar.xz \ + file://dont-depend-on-help2man.patch.patch \ + file://0001-src-local.mk-fix-parallel-issue.patch \ + file://add-with-bisonlocaledir.patch \ ++ file://gnulib.patch \ + " + + # No point in hardcoding path to m4, just use PATH +-- +2.19.1 + diff --git a/utils/0001-PATCH-coreutils-Fix-build-break-with-glibc-2.28.patch b/utils/0001-PATCH-coreutils-Fix-build-break-with-glibc-2.28.patch new file mode 100644 index 00000000..0e5bb245 --- /dev/null +++ b/utils/0001-PATCH-coreutils-Fix-build-break-with-glibc-2.28.patch @@ -0,0 +1,189 @@ +From e619a55c0a299a59f3217ad145a5b69428a8e37e Mon Sep 17 00:00:00 2001 +From: Ferry Toth +Date: Fri, 11 Jan 2019 16:00:58 +0100 +Subject: [PATCH] [PATCH] coreutils: Fix build break with glibc 2.28 + +Exposed when building sumo on Ubuntu 18.10 + +Signed-off-by: Ferry Toth +--- + .../coreutils/coreutils/sumo.patch | 151 ++++++++++++++++++ + meta/recipes-core/coreutils/coreutils_8.29.bb | 1 + + 2 files changed, 152 insertions(+) + create mode 100755 meta/recipes-core/coreutils/coreutils/sumo.patch + mode change 100644 => 100755 meta/recipes-core/coreutils/coreutils_8.29.bb + +diff --git a/meta/recipes-core/coreutils/coreutils/sumo.patch b/meta/recipes-core/coreutils/coreutils/sumo.patch +new file mode 100755 +index 0000000000..03cf3c1b52 +--- /dev/null ++++ b/meta/recipes-core/coreutils/coreutils/sumo.patch +@@ -0,0 +1,151 @@ ++diff -ur coreutils-8.29/lib/fflush.c coreutils-8.29-mod/lib/fflush.c ++--- coreutils-8.29/lib/fflush.c 2019-01-11 15:10:49.792047031 +0100 +++++ coreutils-8.29-mod/lib/fflush.c 2019-01-11 15:51:18.831796152 +0100 ++@@ -33,7 +33,7 @@ ++ #undef fflush ++ ++ ++-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ +++#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ ++ ++ /* Clear the stream's ungetc buffer, preserving the value of ftello (fp). */ ++ static void ++@@ -72,7 +72,7 @@ ++ ++ #endif ++ ++-#if ! (defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */) +++#if ! (defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */) ++ ++ # if (defined __sferror || defined __DragonFly__ || defined __ANDROID__) && defined __SNPT ++ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */ ++@@ -148,7 +148,7 @@ ++ if (stream == NULL || ! freading (stream)) ++ return fflush (stream); ++ ++-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ +++#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ ++ ++ clear_ungetc_buffer_preserving_position (stream); ++ ++diff -ur coreutils-8.29/lib/fpending.c coreutils-8.29-mod/lib/fpending.c ++--- coreutils-8.29/lib/fpending.c 2019-01-11 15:10:50.711269845 +0100 +++++ coreutils-8.29-mod/lib/fpending.c 2019-01-11 15:50:11.153232743 +0100 ++@@ -32,7 +32,7 @@ ++ /* Most systems provide FILE as a struct and the necessary bitmask in ++ , because they need it for implementing getc() and putc() as ++ fast macros. */ ++-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ +++#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ ++ return fp->_IO_write_ptr - fp->_IO_write_base; ++ #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__ ++ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */ ++diff -ur coreutils-8.29/lib/fpurge.c coreutils-8.29-mod/lib/fpurge.c ++--- coreutils-8.29/lib/fpurge.c 2019-01-11 15:10:56.699812540 +0100 +++++ coreutils-8.29-mod/lib/fpurge.c 2019-01-11 15:50:12.552242461 +0100 ++@@ -62,7 +62,7 @@ ++ /* Most systems provide FILE as a struct and the necessary bitmask in ++ , because they need it for implementing getc() and putc() as ++ fast macros. */ ++-# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ +++# if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ ++ fp->_IO_read_end = fp->_IO_read_ptr; ++ fp->_IO_write_ptr = fp->_IO_write_base; ++ /* Avoid memory leak when there is an active ungetc buffer. */ ++diff -ur coreutils-8.29/lib/freadahead.c coreutils-8.29-mod/lib/freadahead.c ++--- coreutils-8.29/lib/freadahead.c 2019-01-11 15:11:03.301249088 +0100 +++++ coreutils-8.29-mod/lib/freadahead.c 2019-01-11 15:50:13.826993749 +0100 ++@@ -30,7 +30,7 @@ ++ size_t ++ freadahead (FILE *fp) ++ { ++-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ +++#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ ++ if (fp->_IO_write_ptr > fp->_IO_write_base) ++ return 0; ++ return (fp->_IO_read_end - fp->_IO_read_ptr) ++diff -ur coreutils-8.29/lib/freading.c coreutils-8.29-mod/lib/freading.c ++--- coreutils-8.29/lib/freading.c 2019-01-11 15:11:02.812511550 +0100 +++++ coreutils-8.29-mod/lib/freading.c 2019-01-11 15:50:21.392772123 +0100 ++@@ -31,7 +31,7 @@ ++ /* Most systems provide FILE as a struct and the necessary bitmask in ++ , because they need it for implementing getc() and putc() as ++ fast macros. */ ++-# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ +++# if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ ++ return ((fp->_flags & _IO_NO_WRITES) != 0 ++ || ((fp->_flags & (_IO_NO_READS | _IO_CURRENTLY_PUTTING)) == 0 ++ && fp->_IO_read_base != NULL)); ++diff -ur coreutils-8.29/lib/freadptr.c coreutils-8.29-mod/lib/freadptr.c ++--- coreutils-8.29/lib/freadptr.c 2019-01-11 15:10:56.059010089 +0100 +++++ coreutils-8.29-mod/lib/freadptr.c 2019-01-11 14:49:54.293455980 +0100 ++@@ -29,7 +29,7 @@ ++ size_t size; ++ ++ /* Keep this code in sync with freadahead! */ ++-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ +++#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ ++ if (fp->_IO_write_ptr > fp->_IO_write_base) ++ return NULL; ++ size = fp->_IO_read_end - fp->_IO_read_ptr; ++diff -ur coreutils-8.29/lib/freadseek.c coreutils-8.29-mod/lib/freadseek.c ++--- coreutils-8.29/lib/freadseek.c 2019-01-11 15:10:50.220888727 +0100 +++++ coreutils-8.29-mod/lib/freadseek.c 2019-01-11 15:49:01.170630156 +0100 ++@@ -36,7 +36,7 @@ ++ /* Keep this code in sync with freadptr! */ ++ #if HAVE___FREADPTRINC /* musl libc */ ++ __freadptrinc (fp, increment); ++-#elif defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ +++#elif defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ ++ fp->_IO_read_ptr += increment; ++ #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__ ++ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */ ++diff -ur coreutils-8.29/lib/fseeko.c coreutils-8.29-mod/lib/fseeko.c ++--- coreutils-8.29/lib/fseeko.c 2019-01-11 15:10:56.840171355 +0100 +++++ coreutils-8.29-mod/lib/fseeko.c 2019-01-11 15:51:28.260424120 +0100 ++@@ -47,7 +47,7 @@ ++ #endif ++ ++ /* These tests are based on fpurge.c. */ ++-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ +++#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ ++ if (fp->_IO_read_end == fp->_IO_read_ptr ++ && fp->_IO_write_ptr == fp->_IO_write_base ++ && fp->_IO_save_base == NULL) ++@@ -123,7 +123,7 @@ ++ return -1; ++ } ++ ++-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ +++#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ ++ fp->_flags &= ~_IO_EOF_SEEN; ++ fp->_offset = pos; ++ #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__ ++diff -ur coreutils-8.29/lib/fseterr.c coreutils-8.29-mod/lib/fseterr.c ++--- coreutils-8.29/lib/fseterr.c 2019-01-11 15:10:55.996374096 +0100 +++++ coreutils-8.29-mod/lib/fseterr.c 2019-01-11 14:49:54.268664903 +0100 ++@@ -29,7 +29,7 @@ ++ /* Most systems provide FILE as a struct and the necessary bitmask in ++ , because they need it for implementing getc() and putc() as ++ fast macros. */ ++-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ +++#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ ++ fp->_flags |= _IO_ERR_SEEN; ++ #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__ ++ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */ ++diff -ur coreutils-8.29/lib/stdio-impl.h coreutils-8.29-mod/lib/stdio-impl.h ++--- coreutils-8.29/lib/stdio-impl.h 2019-01-11 15:11:01.851395400 +0100 +++++ coreutils-8.29-mod/lib/stdio-impl.h 2019-01-11 15:38:43.268798497 +0100 ++@@ -18,6 +18,12 @@ ++ the same implementation of stdio extension API, except that some fields ++ have different naming conventions, or their access requires some casts. */ ++ +++/* Glibc 2.28 made _IO_IN_BACKUP private. For now, work around this +++ problem by defining it ourselves. FIXME: Do not rely on glibc +++ internals. */ +++#if !defined _IO_IN_BACKUP && defined _IO_EOF_SEEN +++# define _IO_IN_BACKUP 0x100 +++#endif ++ ++ /* BSD stdio derived implementations. */ ++ +diff --git a/meta/recipes-core/coreutils/coreutils_8.29.bb b/meta/recipes-core/coreutils/coreutils_8.29.bb +old mode 100644 +new mode 100755 +index b0572afdc0..d525b3c3b4 +--- a/meta/recipes-core/coreutils/coreutils_8.29.bb ++++ b/meta/recipes-core/coreutils/coreutils_8.29.bb +@@ -21,6 +21,7 @@ SRC_URI = "${GNU_MIRROR}/coreutils/${BP}.tar.xz \ + file://0001-local.mk-fix-cross-compiling-problem.patch \ + file://CVE-2017-18018-1.patch \ + file://CVE-2017-18018-2.patch \ ++ file://sumo.patch \ + " + + SRC_URI[md5sum] = "960cfe75a42c9907c71439f8eb436303" +-- +2.19.1 + diff --git a/utils/0001-PATCH-cross-localedef.patch b/utils/0001-PATCH-cross-localedef.patch new file mode 100644 index 00000000..cc6dc7a5 --- /dev/null +++ b/utils/0001-PATCH-cross-localedef.patch @@ -0,0 +1,106 @@ +From d45f21d01e1c1f1b590014712ec5c6d721a83340 Mon Sep 17 00:00:00 2001 +From: Ferry Toth +Date: Fri, 11 Jan 2019 13:04:09 +0100 +Subject: [PATCH] [PATCH] cross-localedef + +Signed-off-by: Marek Vasut +Signed-off-by: Ferry Toth +--- + .../glibc/cross-localedef-native_2.27.bb | 1 + + ...ll-_IO_fwide-if-_LIBC-is-not-defined.patch | 72 +++++++++++++++++++ + 2 files changed, 73 insertions(+) + create mode 100644 meta/recipes-core/glibc/glibc/0001-argp-do-not-call-_IO_fwide-if-_LIBC-is-not-defined.patch + +diff --git a/meta/recipes-core/glibc/cross-localedef-native_2.27.bb b/meta/recipes-core/glibc/cross-localedef-native_2.27.bb +index 5e92eb71d5..e270675651 100644 +--- a/meta/recipes-core/glibc/cross-localedef-native_2.27.bb ++++ b/meta/recipes-core/glibc/cross-localedef-native_2.27.bb +@@ -36,6 +36,7 @@ SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \ + file://0022-eglibc-Forward-port-cross-locale-generation-support.patch \ + file://0023-Define-DUMMY_LOCALE_T-if-not-defined.patch \ + file://archive-path.patch \ ++ file://0001-argp-do-not-call-_IO_fwide-if-_LIBC-is-not-defined.patch \ + " + # Makes for a rather long rev (22 characters), but... + # +diff --git a/meta/recipes-core/glibc/glibc/0001-argp-do-not-call-_IO_fwide-if-_LIBC-is-not-defined.patch b/meta/recipes-core/glibc/glibc/0001-argp-do-not-call-_IO_fwide-if-_LIBC-is-not-defined.patch +new file mode 100644 +index 0000000000..2dac4865cc +--- /dev/null ++++ b/meta/recipes-core/glibc/glibc/0001-argp-do-not-call-_IO_fwide-if-_LIBC-is-not-defined.patch +@@ -0,0 +1,72 @@ ++From 3a67e81d7527363a96af095a5af03b6201b82e9d Mon Sep 17 00:00:00 2001 ++From: Charles-Antoine Couret ++Date: Thu, 29 Nov 2018 17:56:55 +0000 ++Subject: [PATCH] argp: do not call _IO_fwide() if _LIBC is not defined ++ ++_IO_fwide() is defined in libio.h file. This file is included only ++when _LIBC is defined. ++ ++So, in case of compilation of these files without _LIBC definition, ++the compilation failed due to this unknown function. ++ ++Now this function is called when libio.h file is included. ++ ++(Change merged from gnulib. Tested on x86_64.) ++ ++ * argp/argp-fmtstream.c (__argp_fmtstream_update): Use [_LIBC] ++ conditional on calls to _IO_fwide and putwc_unlocked. (Merge from ++ gnulib.) ++ * argp/argp-help.c (__argp_failure): Likewise. ++--- ++ ChangeLog | 7 +++++++ ++ argp/argp-fmtstream.c | 4 ++++ ++ argp/argp-help.c | 2 ++ ++ 3 files changed, 13 insertions(+) ++ ++diff --git a/argp/argp-fmtstream.c b/argp/argp-fmtstream.c ++index e43a0c7cf1..e9e4c0e5cc 100644 ++--- a/argp/argp-fmtstream.c +++++ b/argp/argp-fmtstream.c ++@@ -149,9 +149,11 @@ __argp_fmtstream_update (argp_fmtstream_t fs) ++ size_t i; ++ for (i = 0; i < pad; i++) ++ { +++#ifdef _LIBC ++ if (_IO_fwide (fs->stream, 0) > 0) ++ putwc_unlocked (L' ', fs->stream); ++ else +++#endif ++ putc_unlocked (' ', fs->stream); ++ } ++ } ++@@ -312,9 +314,11 @@ __argp_fmtstream_update (argp_fmtstream_t fs) ++ *nl++ = ' '; ++ else ++ for (i = 0; i < fs->wmargin; ++i) +++#ifdef _LIBC ++ if (_IO_fwide (fs->stream, 0) > 0) ++ putwc_unlocked (L' ', fs->stream); ++ else +++#endif ++ putc_unlocked (' ', fs->stream); ++ ++ /* Copy the tail of the original buffer into the current buffer ++diff --git a/argp/argp-help.c b/argp/argp-help.c ++index 2b6b0775d6..a17260378c 100644 ++--- a/argp/argp-help.c +++++ b/argp/argp-help.c ++@@ -1873,9 +1873,11 @@ __argp_failure (const struct argp_state *state, int status, int errnum, ++ #endif ++ } ++ +++#ifdef _LIBC ++ if (_IO_fwide (stream, 0) > 0) ++ putwc_unlocked (L'\n', stream); ++ else +++#endif ++ putc_unlocked ('\n', stream); ++ ++ #if _LIBC || (HAVE_FLOCKFILE && HAVE_FUNLOCKFILE) ++-- ++2.19.2 ++ +-- +2.19.1 +