summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/systemd/systemd/0022-avoid-missing-LOCK_EX-declaration.patch
blob: 24f3bf74a0d6a79608de6ee90f161bdfafb63599 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
From fd52f1764647e03a35e8f0ed0ef952049073ccbd 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/22] 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/core/exec-invoke.c | 1 +
 src/shared/dev-setup.h | 1 +
 2 files changed, 2 insertions(+)

diff --git a/src/core/exec-invoke.c b/src/core/exec-invoke.c
index 70d963e269..7084811439 100644
--- a/src/core/exec-invoke.c
+++ b/src/core/exec-invoke.c
@@ -4,6 +4,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 5339bc4e5e..0697495f23 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 lock_dev_console(void);
 
-- 
2.34.1