mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-10-20 19:58:34 +00:00
clight: Fix build with musl
log.c uses open() and O_* flags without including <fcntl.h>, 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 <khem.raj@oss.qualcomm.com>
This commit is contained in:
2 files changed
+28
No files matched your search
+27
@@ -0,0 +1,27 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <khem.raj@oss.qualcomm.com>
|
||||
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 <fcntl.h>, 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 <khem.raj@oss.qualcomm.com>
|
||||
---
|
||||
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 <fcntl.h>
|
||||
#include <sys/file.h>
|
||||
#include <sys/stat.h>
|
||||
#include "utils.h"
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user