blob: 7827cc1403c73da2cd11644067d93386adce8ec1 [file] [log] [blame]
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 2 Aug 2023 10:33:48 -0700
Subject: [PATCH] include sys/file.h for LOCK_EX
Fixes
| ../git/src/basic/user-util.c:708:30: error: use of undeclared identifier 'LOCK_EX'; did you mean 'LOCK_BSD'?
| 708 | r = unposix_lock(fd, LOCK_EX);
| | ^~~~~~~
| | LOCK_BSD
Upstream-Status: Backport [https://github.com/systemd/systemd/pull/28647]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
src/basic/user-util.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/basic/user-util.c b/src/basic/user-util.c
index fe61a09005..5c39847733 100644
--- a/src/basic/user-util.c
+++ b/src/basic/user-util.c
@@ -6,6 +6,7 @@
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
+#include <sys/file.h>
#include <sys/stat.h>
#include <unistd.h>
#include <utmp.h>