diff mbox series

owfs: fix build with glibc 2.28

Message ID f1c8bff373e63bd1a6c99a6c554e78f30c0d4495.1536900076.git.baruch@tkos.co.il
State Accepted
Headers show
Series owfs: fix build with glibc 2.28 | expand

Commit Message

Baruch Siach Sept. 14, 2018, 4:41 a.m. UTC
Add upstream patch adding the necessary header for the major() macro.

Fixes:
http://autobuild.buildroot.net/results/53d/53d8832b11f8d63000c2d09ec6fd97048b7883dc/
http://autobuild.buildroot.net/results/90d/90dfdb982ae67f8c4d4923eb8a5495ccb919f6c6/

Cc: Arnout Vandecappelle <arnout@mind.be>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
 ...02-include-sys-sysmacros.h-for-major.patch | 50 +++++++++++++++++++
 1 file changed, 50 insertions(+)
 create mode 100644 package/owfs/0002-include-sys-sysmacros.h-for-major.patch

Comments

Thomas Petazzoni Sept. 14, 2018, 8:16 p.m. UTC | #1
Hello,

On Fri, 14 Sep 2018 07:41:16 +0300, Baruch Siach wrote:
> Add upstream patch adding the necessary header for the major() macro.
> 
> Fixes:
> http://autobuild.buildroot.net/results/53d/53d8832b11f8d63000c2d09ec6fd97048b7883dc/
> http://autobuild.buildroot.net/results/90d/90dfdb982ae67f8c4d4923eb8a5495ccb919f6c6/
> 
> Cc: Arnout Vandecappelle <arnout@mind.be>
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> ---
>  ...02-include-sys-sysmacros.h-for-major.patch | 50 +++++++++++++++++++
>  1 file changed, 50 insertions(+)
>  create mode 100644 package/owfs/0002-include-sys-sysmacros.h-for-major.patch

Applied to master, thanks.

Thomas
diff mbox series

Patch

diff --git a/package/owfs/0002-include-sys-sysmacros.h-for-major.patch b/package/owfs/0002-include-sys-sysmacros.h-for-major.patch
new file mode 100644
index 000000000000..dadf0276cd1e
--- /dev/null
+++ b/package/owfs/0002-include-sys-sysmacros.h-for-major.patch
@@ -0,0 +1,50 @@ 
+From 0d5e4ba51d2b90a64f5d310d715ed367bbcc8996 Mon Sep 17 00:00:00 2001
+From: Tomasz Torcz <tomek@pipebreaker.pl>
+Date: Sat, 17 Mar 2018 12:56:04 +0100
+Subject: [PATCH] include <sys/sysmacros.h> for major()
+
+  Linux glibc ceased to include it in sys/types.h:
+https://sourceware.org/ml/libc-alpha/2015-11/msg00253.html
+
+Signed-off-by: Baruch Siach <baruch@tkos.co.il>
+---
+Upstream status: commit 0d5e4ba51d2
+
+ configure.ac                  | 2 +-
+ module/owlib/src/include/ow.h | 6 +++++-
+ 2 files changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 86751bf7cff7..d625d3f02b48 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -180,7 +180,7 @@ m4_include([src/scripts/m4/acx_pthread.m4])
+ # Checks for header files.
+ AC_HEADER_DIRENT
+ AC_HEADER_STDC
+-AC_CHECK_HEADERS([asm/types.h arpa/inet.h sys/ioctl.h sys/mkdev.h sys/socket.h sys/time.h sys/times.h sys/types.h sys/param.h sys/uio.h feature_tests.h fcntl.h netinet/in.h stdlib.h string.h strings.h sys/file.h syslog.h termios.h unistd.h limits.h stdint.h features.h getopt.h resolv.h semaphore.h])
++AC_CHECK_HEADERS([asm/types.h arpa/inet.h sys/ioctl.h sys/mkdev.h sys/socket.h sys/sysmacros.h sys/time.h sys/times.h sys/types.h sys/param.h sys/uio.h feature_tests.h fcntl.h netinet/in.h stdlib.h string.h strings.h sys/file.h syslog.h termios.h unistd.h limits.h stdint.h features.h getopt.h resolv.h semaphore.h])
+ AC_CHECK_HEADERS([linux/limits.h linux/types.h netdb.h dlfcn.h])
+ AC_CHECK_HEADERS(sys/event.h sys/inotify.h)
+ 
+diff --git a/module/owlib/src/include/ow.h b/module/owlib/src/include/ow.h
+index 9dbec5f31cf7..0a31055238b1 100644
+--- a/module/owlib/src/include/ow.h
++++ b/module/owlib/src/include/ow.h
+@@ -188,8 +188,12 @@
+ #include <netdb.h>				/* for getaddrinfo */
+ #endif							/* HAVE_NETDB_H */
+ 
++#ifdef HAVE_SYS_SYSMACROS_H
++#include <sys/sysmacros.h>			/* for major() */
++#endif							/* HAVE_SYS_SYSMACROS_H */
++
+ #ifdef HAVE_SYS_MKDEV_H
+-#include <sys/mkdev.h>			/* for major() */
++#include <sys/mkdev.h>			/* for major() on Solaris */
+ #endif							/* HAVE_SYS_MKDEV_H */
+ 
+ #include <stddef.h> // for offsetof()
+-- 
+2.18.0
+