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: 45fb815a75 ("util: implement STATIC_ASSERT using c++11 / c11 primitives")

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Suggested-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18611>
(cherry picked from commit a9f3e011e5)
This commit is contained in:
Yonggang Luo 2022-09-15 20:33:45 +08:00 committed by Dylan Baker
parent c2eef037c2
commit 7240cc553e
3 changed files with 2 additions and 3 deletions

View file

@ -5692,7 +5692,7 @@
"description": "drm-shim: drop gnu99 override",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "45fb815a75669b32f6317ba6d53ec9465a4b0ae0"
},

View file

@ -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;

View file

@ -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,