[PATCH i-g-t 3/3] tests/amdgpu/amd_hotplug: Fix compile on Ubuntu 24

Pottumuttu, Sai Teja sai.teja.pottumuttu at intel.com
Fri Mar 14 15:18:08 UTC 2025


On 14-03-2025 05:50, Ashutosh Dixit wrote:
> Fix following compile errors on Ubuntu 24:
> 
> ../tests/amdgpu/amd_hotplug.c: In function ‘is_system_s2idle’:
> ../tests/amdgpu/amd_hotplug.c:110:14: error: implicit declaration of function ‘open’; did you mean ‘popen’? [-Werror=implicit-function-declaration]
>    110 |         fd = open(MEM_SLEEP_PATH, O_RDONLY);
>        |              ^~~~
>        |              popen
> ../tests/amdgpu/amd_hotplug.c:110:14: warning: nested extern declaration of ‘open’ [-Wnested-externs]
> ../tests/amdgpu/amd_hotplug.c:110:35: error: ‘O_RDONLY’ undeclared (first use in this function)
>    110 |         fd = open(MEM_SLEEP_PATH, O_RDONLY);
> 
> Signed-off-by: Ashutosh Dixit <ashutosh.dixit at intel.com>

LGTM,

Reviewed-by: Sai Teja Pottumuttu <sai.teja.pottumuttu at intel.com>

> ---
>   tests/amdgpu/amd_hotplug.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/tests/amdgpu/amd_hotplug.c b/tests/amdgpu/amd_hotplug.c
> index ee3256c0b7..93765afb6a 100644
> --- a/tests/amdgpu/amd_hotplug.c
> +++ b/tests/amdgpu/amd_hotplug.c
> @@ -20,6 +20,7 @@
>    * OTHER DEALINGS IN THE SOFTWARE.
>    */
>   
> +#include <fcntl.h>
>   #include "igt.h"
>   #include "igt_amd.h"
>   


More information about the igt-dev mailing list