package/mbuffer: fix build with c89 or c99
authorFabrice Fontaine <fontaine.fabrice@gmail.com>
Tue, 21 Apr 2020 18:50:29 +0000 (20:50 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Tue, 21 Apr 2020 19:37:50 +0000 (21:37 +0200)
Fixes:
 - http://autobuild.buildroot.org/results/5f4e9079b3377a869ec7002a8138b80eb6194bbb

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/mbuffer/0002-configure.in-set-AC_USE_SYSTEM_EXTENSIONS.patch [new file with mode: 0644]
package/mbuffer/mbuffer.mk

diff --git a/package/mbuffer/0002-configure.in-set-AC_USE_SYSTEM_EXTENSIONS.patch b/package/mbuffer/0002-configure.in-set-AC_USE_SYSTEM_EXTENSIONS.patch
new file mode 100644 (file)
index 0000000..661586c
--- /dev/null
@@ -0,0 +1,38 @@
+From 03db384ff0413d003de271355f59aba8c3f815a1 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Tue, 21 Apr 2020 14:30:20 +0200
+Subject: [PATCH] configure.in: set AC_USE_SYSTEM_EXTENSIONS
+
+Set AC_USE_SYSTEM_EXTENSIONS so _POSIX_SOURCE will be defined and the
+following build failure will be avoided when building in c89 or c99
+mode:
+
+log.c: In function 'infomsg':
+log.c:123:12: error: 'PIPE_BUF' undeclared (first use in this function)
+   if (s <= PIPE_BUF) {
+            ^~~~~~~~
+
+Fixes:
+ - http://autobuild.buildroot.org/results/5f4e9079b3377a869ec7002a8138b80eb6194bbb
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+[Upstream status: sent to thomas@maier-komor.de]
+---
+ configure.in | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/configure.in b/configure.in
+index 02921c2..aba4af0 100644
+--- a/configure.in
++++ b/configure.in
+@@ -3,6 +3,7 @@ AC_CONFIG_HEADER(config.h)
+ AC_CANONICAL_SYSTEM
+ AC_EXEEXT
++AC_USE_SYSTEM_EXTENSIONS
+ PACKAGE=mbuffer
+ VERSION=20140310
+-- 
+2.25.1
+
index 6ff6e27a398ddefa225f1fa293c4ca45ae0a1ef0..324780fe69162ea3c90808cadc015ea2d1420d34 100644 (file)
@@ -11,6 +11,8 @@ MBUFFER_LICENSE = GPL-3.0+
 MBUFFER_LICENSE_FILES = LICENSE
 MBUFFER_CONF_OPTS = --disable-debug
 MBUFFER_CONF_ENV = CFLAGS="$(TARGET_CFLAGS) -std=c99"
+# We're patching configure.in
+MBUFFER_AUTORECONF = YES
 
 # we don't need tests & co. so we specify a target
 # so that the others don't get built, e.g idev.so