Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tests/amdgpu/amd_hotplug: add missing include file fcntl.h
@ 2025-03-14  3:32 Alex Hung
  2025-03-14  7:57 ` Chung, ChiaHsuan (Tom)
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Alex Hung @ 2025-03-14  3:32 UTC (permalink / raw)
  To: igt-dev, chiahsuan.chung; +Cc: alex.hung

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@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"
 
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-03-14 23:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-14  3:32 [PATCH] tests/amdgpu/amd_hotplug: add missing include file fcntl.h Alex Hung
2025-03-14  7:57 ` Chung, ChiaHsuan (Tom)
2025-03-14 16:32   ` Kamil Konieczny
2025-03-14 18:49 ` ✓ Xe.CI.Full: success for " Patchwork
2025-03-14 23:38 ` ✗ Fi.CI.BAT: failure for tests/amdgpu/amd_hotplug: add missing include file fcntl.h (rev2) Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox