summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/systemd/systemd/0022-avoid-missing-LOCK_EX-declaration.patch
blob: f517392e58d938243a130b2b0f39242f9ec61f4c (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
From 97d3ed7834bd86615ba4acdbef984c677b7e7791 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] 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 fe14ceeb31..521e7b87ff 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);