package/weston: add patch fixing missing fnctl include
PATCH 1/1 package/weston: add patch fixing missing fnctl include
This is needed to fix a build issue with musl libc.
Fixes:
http://autobuild.buildroot.net/results/931/931dc2bfd431dffc4693b62e0889e43709331d8e/build-end.log
Signed-off-by James Hilliard <[email protected]>
--- ...ntl.h-for-open-O_RDWR-O_CLOEXEC-and-.patch | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 package/weston/0001-tests-include-fcntl.h-for-open-O_RDWR-O_CLOEXEC-and-.patch
package/weston/0001-tests-include-fcntl.h-for-open-O_RDWR-O_CLOEXEC-and-.patch new file +48 -0
@@ -0,0 +1,48 @@ +From b10c0e843dcb8148bbe869bb15261955b94ac98c Mon Sep 17 00:00:00 2001 +From: Denys Dmytriyenko <[email protected]> +Date: Tue, 8 Sep 2020 19:37:42 -0400 +Subject: [PATCH] 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 <[email protected]> +Signed-off-by: James Hilliard <[email protected]> +[james.hilliard1 at gmail.com: backport from upstream commit +b10c0e843dcb8148bbe869bb15261955b94ac98c] +--- + tests/weston-test-fixture-compositor.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/tests/weston-test-fixture-compositor.c b/tests/weston-test-fixture-compositor.c +index 1c32959c..c1eb26c4 100644 +--- a/tests/weston-test-fixture-compositor.c ++++ b/tests/weston-test-fixture-compositor.c +@@ -35,6 +35,7 @@ + #include <stdarg.h> + #include <stdlib.h> + #include <errno.h> ++#include <fcntl.h> + + #include "shared/helpers.h" + #include "weston-test-fixture-compositor.h" +-- +2.25.1 +
Signature · 1 line
2.25.1
Thomas Petazzoni
AppliedPATCH 1/1 package/weston: add patch fixing missing fnctl include
Quoted 10 lines · On Wed, 9 Sep 2020 12:22:10 -0600 James Hilliard <[email protected]>…
This is needed to fix a build issue with musl libc.
Fixes:
http://autobuild.buildroot.net/results/931/931dc2bfd431dffc4693b62e0889e43709331d8e/build-end.logSigned-off-by James Hilliard <[email protected]>--- ...ntl.h-for-open-O_RDWR-O_CLOEXEC-and-.patch | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 package/weston/0001-tests-include-fcntl.h-for-open-O_RDWR-O_CLOEXEC-and-.patch
Applied to master, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com