[PATCH i-g-t v1 1/1] tests/intel/kms_pm_backlight: Fixed build on musl
Janusz Krzysztofik
janusz.krzysztofik at linux.intel.com
Thu Aug 22 18:44:54 UTC 2024
Hi Kamil,
On Wednesday, 21 August 2024 11:51:37 GMT+2 Kamil Konieczny wrote:
> 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>
Assuming you tried to follow the linux kernel rule of sorting headers
alphabetically, why did you place unistd.h at the top?
> +#include <errno.h>
> +#include <fcntl.h>
> +#include <libgen.h> /* for POSIX basename */
LGTM.
> #include <limits.h>
> +#include <stdio.h>
> #include <sys/types.h>
> #include <sys/stat.h>
With still the same assumption, did you notice the above two headers are in
reverse alphabetic order?
With either the headers in correct alphabetic order, or otherwise the existing
headers untouched:
Reviewed-by: Janusz Krzysztofik <janusz.krzysztofik at linux.intel.com>
Thanks,
Janusz
> -#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"
>
>
More information about the igt-dev
mailing list