Module: Mesa
Branch: main
Commit: a9f3e011e5f14af4ac4ccd6e581b6ec7cd8b8554
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=a9f3e011e5f14af4ac4ccd6e581b6ec7cd8b8554

Author: Yonggang Luo <[email protected]>
Date:   Thu Sep 15 20:33:45 2022 +0800

drm-shim: drop gnu99 override

If we override with gnu99 here, we effectively down-grade from C11,
meaning we can no longer assume static_assert support.

Fixes: 45fb815a756 ("util: implement STATIC_ASSERT using c++11 / c11 
primitives")

Signed-off-by: Yonggang Luo <[email protected]>
Suggested-by: Chia-I Wu <[email protected]>
Reviewed-by: Erik Faye-Lund <[email protected]>
Reviewed-by: Eric Engestrom <[email protected]>
Reviewed-by: Chia-I Wu <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18611>

---

 src/drm-shim/drm_shim.c  | 2 +-
 src/drm-shim/meson.build | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/drm-shim/drm_shim.c b/src/drm-shim/drm_shim.c
index 940b42a3a12..974013ea586 100644
--- a/src/drm-shim/drm_shim.c
+++ b/src/drm-shim/drm_shim.c
@@ -52,7 +52,7 @@
 #include "util/u_debug.h"
 #include "drm_shim.h"
 
-#define REAL_FUNCTION_POINTER(x) typeof(x) *real_##x
+#define REAL_FUNCTION_POINTER(x) __typeof__(x) *real_##x
 
 static mtx_t shim_lock = _MTX_INITIALIZER_NP;
 struct set *opendir_set;
diff --git a/src/drm-shim/meson.build b/src/drm-shim/meson.build
index 2a7ea000a61..bd56e642c02 100644
--- a/src/drm-shim/meson.build
+++ b/src/drm-shim/meson.build
@@ -28,7 +28,6 @@ drm_shim = static_library(
   include_directories: [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, 
inc_gallium_aux],
   dependencies: [dep_libdrm, idep_mesautil, dep_dl],
   gnu_symbol_visibility : 'hidden',
-  override_options : ['c_std=gnu99'],
 )
 dep_drm_shim = declare_dependency(
   link_with: drm_shim,

Reply via email to