[igt-dev] [PATCH v3 6/7] lib: include limits.h to fix build with musl libc

Bernd Kuhls bernd at kuhls.net
Mon Oct 30 19:58:08 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:
Link: https://gitlab.freedesktop.org/drm/igt-gpu-tools/-/issues/138

Signed-off-by: Stefano Ragni <st3r4g at protonmail.com>
Signed-off-by: Bernd Kuhls <bernd at kuhls.net>
[Bernd: alphabetically sorted includes, removed includes not needed
 anymore]
---
v3: split patches for lib/ and tests/ (Kamil)

 lib/igt_aux.c   | 1 +
 lib/igt_eld.c   | 1 +
 lib/igt_hwmon.c | 1 +
 3 files changed, 3 insertions(+)

diff --git a/lib/igt_aux.c b/lib/igt_aux.c
index 18edc5ef9..d6aeb876b 100644
--- a/lib/igt_aux.c
+++ b/lib/igt_aux.c
@@ -31,6 +31,7 @@
 #endif
 #include <stdio.h>
 #include <fcntl.h>
+#include <limits.h> // PATH_MAX
 #include <pwd.h>
 #include <sys/stat.h>
 #include <sys/ioctl.h>
diff --git a/lib/igt_eld.c b/lib/igt_eld.c
index ef6625df1..6cec9abdd 100644
--- a/lib/igt_eld.c
+++ b/lib/igt_eld.c
@@ -28,6 +28,7 @@
 #include <dirent.h>
 #include <errno.h>
 #include <glob.h>
+#include <limits.h> // PATH_MAX
 #include <stdint.h>
 #include <stdio.h>
 #include <string.h>
diff --git a/lib/igt_hwmon.c b/lib/igt_hwmon.c
index f37ced2d9..53c346e73 100644
--- a/lib/igt_hwmon.c
+++ b/lib/igt_hwmon.c
@@ -2,6 +2,7 @@
 /*
  * Copyright © 2022 Intel Corporation
  */
+#include <limits.h> // PATH_MAX
 #include <sys/stat.h>
 #include <sys/sysmacros.h>
 #include <dirent.h>
-- 
2.39.2



More information about the igt-dev mailing list