[PATCH] tests/amdgpu/amd_hotplug: add missing include file fcntl.h
Chung, ChiaHsuan (Tom)
chiahsuan.chung at amd.com
Fri Mar 14 07:57:24 UTC 2025
Thank you so much.
Reviewed-by: Tom Chung <chiahsuan.chung at amd.com>
On 3/14/2025 11:32 AM, Alex Hung wrote:
> Add missing include file to fix cross-compilation errors:
>
> ../tests/amdgpu/amd_hotplug.c: In function ‘is_system_s2idle’:
> ../tests/amdgpu/amd_hotplug.c:110:7: error: implicit declaration of function ‘open’; did you mean ‘popen’? [-Werror=implicit-function-declaration]
> fd = open(MEM_SLEEP_PATH, O_RDONLY);
> ^~~~
> popen
> ../tests/amdgpu/amd_hotplug.c:110:7: warning: nested extern declaration of ‘open’ [-Wnested-externs]
> ../tests/amdgpu/amd_hotplug.c:110:28: error: ‘O_RDONLY’ undeclared (first use in this function); did you mean ‘STA_RONLY’?
> fd = open(MEM_SLEEP_PATH, O_RDONLY);
> ^~~~~~~~
> STA_RONLY
>
> Fixes: 6796e79abba2 ("tests/amdgpu/amd_hotplug: Check the suspend state after resume")
> Signed-off-by: Alex Hung <alex.hung at amd.com>
> ---
> tests/amdgpu/amd_hotplug.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/tests/amdgpu/amd_hotplug.c b/tests/amdgpu/amd_hotplug.c
> index ee3256c0b..bbd50452b 100644
> --- a/tests/amdgpu/amd_hotplug.c
> +++ b/tests/amdgpu/amd_hotplug.c
> @@ -20,6 +20,8 @@
> * OTHER DEALINGS IN THE SOFTWARE.
> */
>
> +#include <fcntl.h>
> +
> #include "igt.h"
> #include "igt_amd.h"
>
More information about the igt-dev
mailing list