summaryrefslogtreecommitdiff
path: root/gnu/packages/patches/directfb-davinci-glibc-228-compat.patch
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2023-06-12 18:07:07 +0300
committerEfraim Flashner <efraim@flashner.co.il>2023-06-12 18:12:39 +0300
commit3fc26c6dc4b6bbf558a17b5e3ef8092ea0eeeacd (patch)
tree5310787d35622d8d6e14a916d6617400b2a71cf4 /gnu/packages/patches/directfb-davinci-glibc-228-compat.patch
parent0e21b01a9a982b77428c25b96661bb5108017e0d (diff)
gnu: directfb: Fix building on armhf-linux.
* gnu/packages/graphics.scm (directfb)[arguments]: Add a phase when building for armhf-linux to apply a patch. [native-inputs]: Add patch, patch file. * gnu/packages/patches/directfb-davinci-glibc-228-compat.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it.
Diffstat (limited to 'gnu/packages/patches/directfb-davinci-glibc-228-compat.patch')
-rw-r--r--gnu/packages/patches/directfb-davinci-glibc-228-compat.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/gnu/packages/patches/directfb-davinci-glibc-228-compat.patch b/gnu/packages/patches/directfb-davinci-glibc-228-compat.patch
new file mode 100644
index 0000000000..eeee337f57
--- /dev/null
+++ b/gnu/packages/patches/directfb-davinci-glibc-228-compat.patch
@@ -0,0 +1,41 @@
+This patch is from upstream
+
+From 3a236241bbec3f15b012b6f0dbe94353d8094557 Mon Sep 17 00:00:00 2001
+From: Andrew Childs <lorne@cons.org.nz>
+Date: Sat, 2 May 2020 12:36:46 +0900
+Subject: [PATCH] davinci: fix build with glibc >= 2.28
+
+From glibc 2.28 release notes:
+
+* The macros 'major', 'minor', and 'makedev' are now only available from
+ the header <sys/sysmacros.h>; not from <sys/types.h> or various other
+ headers that happen to include <sys/types.h>. These macros are rarely
+ used, not part of POSIX nor XSI, and their names frequently collide with
+ user code; see https://sourceware.org/bugzilla/show_bug.cgi?id=19239 for
+ further explanation.
+
+ <sys/sysmacros.h> is a GNU extension. Portable programs that require
+ these macros should first include <sys/types.h>, and then include
+ <sys/sysmacros.h> if __GNU_LIBRARY__ is defined.
+
+https://lists.gnu.org/archive/html/info-gnu/2018-08/msg00000.html
+---
+ gfxdrivers/davinci/davinci_c64x.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/gfxdrivers/davinci/davinci_c64x.c b/gfxdrivers/davinci/davinci_c64x.c
+index 431ffdd99..351250a03 100644
+--- a/gfxdrivers/davinci/davinci_c64x.c
++++ b/gfxdrivers/davinci/davinci_c64x.c
+@@ -39,6 +39,11 @@
+ #include <sys/types.h>
+ #include <unistd.h>
+
++// Required for `makedev` in glibc >= 2.28
++#if defined(__GNU_LIBRARY__)
++#include <sys/sysmacros.h>
++#endif
++
+ #include <directfb_util.h>
+
+ #include <direct/clock.h>