unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
blob eeee337f57d7aa388f1017e80f602ce1c889773f 1430 bytes (raw)
name: packages/patches/directfb-davinci-glibc-228-compat.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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>

debug log:

solving eeee337f57d7aa388f1017e80f602ce1c889773f ...
found eeee337f57d7aa388f1017e80f602ce1c889773f in https://git.savannah.gnu.org/cgit/guix.git

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).