[PATCH i-g-t v1 1/1] tests/intel/kms_pm_backlight: Fixed build on musl

Kamil Konieczny kamil.konieczny at linux.intel.com
Wed Aug 21 09:51:37 UTC 2024


Fix compilation on musl by including proper POSIX header for
basename. Also while at this, sort out other headers.

Cc: Mohammed Anas <triallax at tutanota.com>
Cc: Stefano Ragni <st3r4g at protonmail.com>
Cc: Bernd Kuhls <bernd at kuhls.net>
Cc: Reagan Bohan <xbjfk.github at gmail.com>
Reported-by: Yureka <yuka at yuka.dev>
Signed-off-by: Kamil Konieczny <kamil.konieczny at linux.intel.com>
---
 tests/intel/kms_pm_backlight.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/tests/intel/kms_pm_backlight.c b/tests/intel/kms_pm_backlight.c
index 8672afa7a..c2213d3b1 100644
--- a/tests/intel/kms_pm_backlight.c
+++ b/tests/intel/kms_pm_backlight.c
@@ -35,15 +35,17 @@
  * Test category: functionality test
  */
 
-#include "igt.h"
+#include <unistd.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <libgen.h> /* for POSIX basename */
 #include <limits.h>
+#include <stdio.h>
 #include <sys/types.h>
 #include <sys/stat.h>
-#include <fcntl.h>
-#include <stdio.h>
-#include <errno.h>
-#include <unistd.h>
 #include <time.h>
+
+#include "igt.h"
 #include "igt_device.h"
 #include "igt_device_scan.h"
 
-- 
2.43.0



More information about the igt-dev mailing list