package/mesa3d: fix uClibc build

Moved the util/compiler.h include to util/macros.h due to upstream
commit which added static_assert() to src/util/macros.h
https://cgit.freedesktop.org/mesa/mesa/commit/src/util/macros.h?h=22.2&id=f1023571e8ce7ccb6ec7bc115240cb76aef3e5e5

Please note that this patch can be removed when buildroot toolchains
are updated to uClibc 1.0.42:
https://cgit.uclibc-ng.org/cgi/cgit/uclibc-ng.git/commit/?h=v1.0.42&id=03fbd941e943976bb92cb392882c2ff7ec218704

Fixes:
http://autobuild.buildroot.net/results/a55/a55d6980faad8b5063f8f4f8b89467061d44a2ae/

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
Bernd Kuhls 2022-11-16 19:04:52 +01:00 committed by Thomas Petazzoni
parent 75cb8a4902
commit 6ebfe647b6

View File

@ -18,29 +18,22 @@ Fixes build errors with uClibc and gcc-9.3.0:
function static_assert [-Werror=implicit-function-declaration] 101 |
static_assert(ARRAY_SIZE(egl_platforms) == _EGL_NUM_PLATFORMS,
../src/util/macros.h:74:4: error: implicit declaration of function
static_assert [-Werror=implicit-function-declaration]
74 | static_assert(cond, #cond); \
| ^~~~~~~~~~~~~
Patch sent upstream:
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13898
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
src/egl/main/egldisplay.c | 1 +
src/util/compiler.h | 10 ++++++++++
src/util/compiler.h | 10 ++++++++++
src/util/macros.h | 1 +
2 files changed, 11 insertions(+)
diff --git a/src/egl/main/egldisplay.c b/src/egl/main/egldisplay.c
index 131fc22786f9..d3e2bb96e2f6 100644
--- a/src/egl/main/egldisplay.c
+++ b/src/egl/main/egldisplay.c
@@ -42,6 +42,7 @@
#endif
#include <fcntl.h>
#include "c11/threads.h"
+#include "util/compiler.h"
#include "util/macros.h"
#include "util/os_file.h"
#include "util/u_atomic.h"
diff --git a/src/util/compiler.h b/src/util/compiler.h
index d184ad455af9..b5c56807acc6 100644
index d184ad455af..b5c56807acc 100644
--- a/src/util/compiler.h
+++ b/src/util/compiler.h
@@ -36,6 +36,16 @@
@ -60,6 +53,18 @@ index d184ad455af9..b5c56807acc6 100644
#include "util/macros.h"
diff --git a/src/util/macros.h b/src/util/macros.h
index 22b18303826..8f73ee72693 100644
--- a/src/util/macros.h
+++ b/src/util/macros.h
@@ -27,6 +27,7 @@
#include <stdio.h>
#include <assert.h>
#include <stdint.h>
+#include "util/compiler.h"
/* Compute the size of an array */
#ifndef ARRAY_SIZE
--
GitLab
2.34.1