[igt-dev] [PATCH i-g-t 11/29] i915/pm_backlight: use POSIX basename
Petri Latvala
petri.latvala at intel.com
Mon Dec 16 13:31:34 UTC 2019
On Tue, Dec 10, 2019 at 04:52:17PM -0800, D Scott Phillips wrote:
> 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>
Needs to be wrapped in #ifdef HAVE_LIBGEN_H though.
--
Petri Latvala
More information about the igt-dev
mailing list