[igt-dev] [PATCH i-g-t 11/29] i915/pm_backlight: use POSIX basename

D Scott Phillips d.scott.phillips at intel.com
Wed Dec 11 00:52:17 UTC 2019


We can get POSIX basename by including libgen.h. It behaves
slightly differently from GNU basename, like possibly modifying
the passed in string. This is OK in this usage, and POSIX basename
is available on other platforms.

Signed-off-by: D Scott Phillips <d.scott.phillips at intel.com>
---
 tests/i915/i915_pm_backlight.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/i915/i915_pm_backlight.c b/tests/i915/i915_pm_backlight.c
index 83b1ed68..2f65156f 100644
--- a/tests/i915/i915_pm_backlight.c
+++ b/tests/i915/i915_pm_backlight.c
@@ -30,6 +30,7 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
+#include <libgen.h>
 #include <stdio.h>
 #include <errno.h>
 #include <unistd.h>
-- 
2.23.0



More information about the igt-dev mailing list