Skip to content
Snippets Groups Projects
Commit a8513485 authored by Alex Hung's avatar Alex Hung Committed by Kamil Konieczny
Browse files

tests/amdgpu/amd_hotplug: add missing include file fcntl.h


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: 6796e79a ("tests/amdgpu/amd_hotplug: Check the suspend state after resume")
Signed-off-by: default avatarAlex Hung <alex.hung@amd.com>
Reviewed-by: default avatarTom Chung <chiahsuan.chung@amd.com>
parent 6796e79a
No related branches found
No related tags found
No related merge requests found
Pipeline #1384313 passed
......@@ -20,6 +20,8 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
#include <fcntl.h>
#include "igt.h"
#include "igt_amd.h"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment