[igt-dev] [PATCH 3/7] lib/igt_aux.h: Fix musl build

Bernd Kuhls bernd at kuhls.net
Sun Oct 22 15:52:22 UTC 2023


From: Stefano Ragni <st3r4g at protonmail.com>

Original patch was added to void-linux:
https://github.com/void-linux/void-packages/commit/ddfc1f66a0c571b420303c33aed29fd38ace4fc7

Bug report with request to split the original patch into some
functional changes:
https://gitlab.freedesktop.org/drm/igt-gpu-tools/-/issues/138

Fixes build error:
../lib/igt_aux.c:191:20: error: ‘struct sigevent’ has no member named ‘_sigev_un’
  191 |                 sev.sigev_notify_thread_id = __igt_sigiter.tid;

../lib/igt_aux.c:1994:12: error: ‘struct sigevent’ has no member named ‘_sigev_un’
 1994 |         sev.sigev_notify_thread_id = gettid();

Signed-off-by: Bernd Kuhls <bernd at kuhls.net>
---
 lib/igt_aux.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/igt_aux.h b/lib/igt_aux.h
index fb76b0313..a13e8156a 100644
--- a/lib/igt_aux.h
+++ b/lib/igt_aux.h
@@ -48,7 +48,7 @@
 # ifndef HAVE_GETTID
 #  define gettid() (pid_t)(syscall(__NR_gettid))
 # endif
-# define sigev_notify_thread_id _sigev_un._tid
+# define sigev_notify_thread_id sigev_notify_function
 #endif
 
 /* auxialiary igt helpers from igt_aux.c */
-- 
2.39.2



More information about the igt-dev mailing list