From 5b8df64993b68a5a4af0f214d8cae77f4e716593 Mon Sep 17 00:00:00 2001
From: Chen Qi <Qi.Chen@windriver.com>
Date: Tue, 2 Jan 2024 11:03:27 +0800
Subject: [PATCH 22/26] avoid missing LOCK_EX declaration

This only happens on MUSL. Include sys/file.h to avoid compilation
error about missing LOCK_EX declaration.

Upstream-Status: Inappropriate [musl specific]

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 src/basic/fd-util.h    | 1 +
 src/core/exec-invoke.c | 1 +
 src/shared/dev-setup.h | 1 +
 3 files changed, 3 insertions(+)

diff --git a/src/basic/fd-util.h b/src/basic/fd-util.h
index 93b254c680..5f0b1a816d 100644
--- a/src/basic/fd-util.h
+++ b/src/basic/fd-util.h
@@ -6,6 +6,7 @@
 #include <stdbool.h>
 #include <stdio.h>
 #include <sys/socket.h>
+#include <sys/file.h>
 
 #include "macro.h"
 #include "missing_fcntl.h"
diff --git a/src/core/exec-invoke.c b/src/core/exec-invoke.c
index 9d636f5529..6be43caa57 100644
--- a/src/core/exec-invoke.c
+++ b/src/core/exec-invoke.c
@@ -5,6 +5,7 @@
 #include <sys/ioctl.h>
 #include <sys/mount.h>
 #include <sys/prctl.h>
+#include <sys/file.h>
 
 #if HAVE_PAM
 #include <security/pam_appl.h>
diff --git a/src/shared/dev-setup.h b/src/shared/dev-setup.h
index 92ba6cf764..ba01a0ae55 100644
--- a/src/shared/dev-setup.h
+++ b/src/shared/dev-setup.h
@@ -2,6 +2,7 @@
 #pragma once
 
 #include <sys/types.h>
+#include <sys/file.h>
 
 int dev_setup(const char *prefix, uid_t uid, gid_t gid);
 
-- 
2.34.1

