Fix compilation on armv7l with gcc 11.2.0
authorsatmandu <satadru@umich.edu>
Fri, 10 Sep 2021 20:58:09 +0000 (20:58 +0000)
committerMarge Bot <emma+marge@anholt.net>
Wed, 5 Jan 2022 02:48:29 +0000 (02:48 +0000)
Cc: mesa-stable
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12810>

src/gallium/drivers/freedreno/freedreno_util.h

index 5e00657..22f99c4 100644 (file)
@@ -106,12 +106,14 @@ extern bool fd_binning_enabled;
 
 #include <unistd.h>
 #include <sys/types.h>
+#include <sys/syscall.h>
 
 #define DBG(fmt, ...)                                                          \
    do {                                                                        \
       if (FD_DBG(MSGS))                                                        \
-         mesa_logi("%5d: %s:%d: " fmt, gettid(), __FUNCTION__, __LINE__,       \
-                   ##__VA_ARGS__);                                             \
+         mesa_logi("%5d: %s:%d: " fmt, ((pid_t)syscall(SYS_gettid)),           \
+                                        __FUNCTION__, __LINE__,                \
+                                        ##__VA_ARGS__);                        \
    } while (0)
 
 #define perf_debug_message(debug, type, ...)                                   \