[PATCH i-g-t 3/3] tests/amdgpu/amd_hotplug: Fix compile on Ubuntu 24
Ashutosh Dixit
ashutosh.dixit at intel.com
Fri Mar 14 00:20:58 UTC 2025
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>
---
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"
--
2.48.1
More information about the igt-dev
mailing list