From c794b5fe79dc2d05652763ede841621f7f7918b0 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sun, 18 Oct 2026 17:12:38 -0700 Subject: [PATCH] clight: Fix build with musl log.c uses open() and O_* flags without including , which glibc pulls in indirectly but musl does not, so clang fails with -Wimplicit-function-declaration. AI-Generated: Uses Claude Code Signed-off-by: Khem Raj --- ...nclude-fcntl.h-for-open-and-O_-flags.patch | 27 +++++++++++++++++++ .../recipes-multimedia/clight/clight_4.11.bb | 1 + 2 files changed, 28 insertions(+) create mode 100644 meta-multimedia/recipes-multimedia/clight/clight/0001-log-Include-fcntl.h-for-open-and-O_-flags.patch diff --git a/meta-multimedia/recipes-multimedia/clight/clight/0001-log-Include-fcntl.h-for-open-and-O_-flags.patch b/meta-multimedia/recipes-multimedia/clight/clight/0001-log-Include-fcntl.h-for-open-and-O_-flags.patch new file mode 100644 index 0000000000..0faeb84402 --- /dev/null +++ b/meta-multimedia/recipes-multimedia/clight/clight/0001-log-Include-fcntl.h-for-open-and-O_-flags.patch @@ -0,0 +1,27 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sun, 18 Oct 2026 17:05:19 -0700 +Subject: [PATCH] log: Include fcntl.h for open() and O_* flags + +open(), O_CREAT and O_WRONLY are declared in , which glibc +happens to pull in through other headers but musl does not, so the +build fails with clang: + + src/utils/log.c:33:14: error: call to undeclared function 'open' + +Upstream-Status: Pending +AI-Generated: Uses Claude Code +Signed-off-by: Khem Raj +--- + src/utils/log.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/utils/log.c b/src/utils/log.c +index 0ec38a5..8d46b90 100644 +--- a/src/utils/log.c ++++ b/src/utils/log.c +@@ -1,3 +1,4 @@ ++#include + #include + #include + #include "utils.h" diff --git a/meta-multimedia/recipes-multimedia/clight/clight_4.11.bb b/meta-multimedia/recipes-multimedia/clight/clight_4.11.bb index 6280bd21b0..6f797ad601 100644 --- a/meta-multimedia/recipes-multimedia/clight/clight_4.11.bb +++ b/meta-multimedia/recipes-multimedia/clight/clight_4.11.bb @@ -7,6 +7,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" SRCREV = "6a5ad96ce7643c433ea2f6bd597bc52dcc744120" SRC_URI = "git://github.com/FedeDP/${BPN};protocol=https;branch=master;tag=${PV} \ + file://0001-log-Include-fcntl.h-for-open-and-O_-flags.patch \ " inherit cmake pkgconfig features_check