tests: include fcntl.h for open(), O_RDWR, O_CLOEXEC and O_CREAT
musl libc (unlike glibc) requires explicitly incuding fcntl.h to define open(), O_RDWR, O_CLOEXEC and O_CREAT. Otherwise the build fails with the errors:
| ../weston-9.0.0/tests/weston-test-fixture-compositor.c: In function 'wait_for_lock':
| ../weston-9.0.0/tests/weston-test-fixture-compositor.c:135:7: warning: implicit declaration of function 'open'; did you mean 'popen'? [-Wimplicit-function-declaration]
| 135 | fd = open(lock_path, O_RDWR | O_CLOEXEC | O_CREAT, 00700);
| | ^~~~
| | popen
| ../weston-9.0.0/tests/weston-test-fixture-compositor.c:135:23: error: 'O_RDWR' undeclared (first use in this function)
| 135 | fd = open(lock_path, O_RDWR | O_CLOEXEC | O_CREAT, 00700);
| | ^~~~~~
| ../weston-9.0.0/tests/weston-test-fixture-compositor.c:135:23: note: each undeclared identifier is reported only once for each function it appears in
| ../weston-9.0.0/tests/weston-test-fixture-compositor.c:135:32: error: 'O_CLOEXEC' undeclared (first use in this function)
| 135 | fd = open(lock_path, O_RDWR | O_CLOEXEC | O_CREAT, 00700);
| | ^~~~~~~~~
| ../weston-9.0.0/tests/weston-test-fixture-compositor.c:135:44: error: 'O_CREAT' undeclared (first use in this function)
| 135 | fd = open(lock_path, O_RDWR | O_CLOEXEC | O_CREAT, 00700);
| | ^~~~~~~
Signed-off-by: Denys Dmytriyenko denys@ti.com
Closes: #432 (closed)
Edited by Simon Ser