diff mbox series

[OpenWrt-Devel] util-linux: Fix widechar check

Message ID 20190718013000.18102-1-rosenp@gmail.com
State Deferred, archived
Delegated to: Petr Štetiar
Headers show
Series [OpenWrt-Devel] util-linux: Fix widechar check | expand

Commit Message

Rosen Penev July 18, 2019, 1:30 a.m. UTC
Patch is an upstream backport.

Fixes compilation when -Werror=implicit-function-declaration is passed.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
 package/utils/util-linux/Makefile             |  2 +-
 .../util-linux/patches/010-stdlib.h.patch     | 26 +++++++++++++++++++
 2 files changed, 27 insertions(+), 1 deletion(-)
 create mode 100644 package/utils/util-linux/patches/010-stdlib.h.patch

Comments

Petr Štetiar July 18, 2019, 7:54 a.m. UTC | #1
Rosen Penev <rosenp@gmail.com> [2019-07-17 18:30:00]:

> Patch is an upstream backport.

Can't we simply wait tillnext util-linux bump?

> Fixes compilation when -Werror=implicit-function-declaration is passed.

Can you please explain why is this patch needed, what is failing, who passes
this flag?

-- ynezz
Rosen Penev July 18, 2019, 4:46 p.m. UTC | #2
On Thu, Jul 18, 2019 at 12:54 AM Petr Štetiar <ynezz@true.cz> wrote:
>
> Rosen Penev <rosenp@gmail.com> [2019-07-17 18:30:00]:
>
> > Patch is an upstream backport.
>
> Can't we simply wait tillnext util-linux bump?
Makes no difference to me.
>
> > Fixes compilation when -Werror=implicit-function-declaration is passed.
>
> Can you please explain why is this patch needed, what is failing, who passes
> this flag?
>
> -- ynezz
diff mbox series

Patch

diff --git a/package/utils/util-linux/Makefile b/package/utils/util-linux/Makefile
index 261a9615ef..3ce6354ec3 100644
--- a/package/utils/util-linux/Makefile
+++ b/package/utils/util-linux/Makefile
@@ -9,7 +9,7 @@  include $(TOPDIR)/rules.mk
 
 PKG_NAME:=util-linux
 PKG_VERSION:=2.34
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@KERNEL/linux/utils/$(PKG_NAME)/v2.34
diff --git a/package/utils/util-linux/patches/010-stdlib.h.patch b/package/utils/util-linux/patches/010-stdlib.h.patch
new file mode 100644
index 0000000000..49745c7dc7
--- /dev/null
+++ b/package/utils/util-linux/patches/010-stdlib.h.patch
@@ -0,0 +1,26 @@ 
+From 1632856ef19efb50c57c939b82a9ff712b3c0b09 Mon Sep 17 00:00:00 2001
+From: Florian Weimer <fweimer@redhat.com>
+Date: Fri, 5 Jul 2019 17:20:27 +0200
+Subject: [PATCH] build-sys: Include <stdlib.h> in ./configure wchar_t test
+
+Without #include <stdlib.h>, this configure check fails for strict
+C99/C11 compilers which do not support implicit function declarations
+(which are a C90 feature removed from C99).
+
+Signed-off-by: Karel Zak <kzak@redhat.com>
+---
+ configure.ac | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/configure.ac b/configure.ac
+index a840e20ee..997b6388c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -752,6 +752,7 @@ UL_REQUIRES_COMPILE([widechar], [[
+   #include <wchar.h>
+   #include <wctype.h>
+   #include <stdio.h>
++  #include <stdlib.h>
+   ]], [[
+     wchar_t wc;
+     wint_t w;