]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
basic: Include <sys/file.h> for LOCK_* constants
authorA. Wilcox <AWilcox@Wilcox-Tech.com>
Wed, 21 Aug 2024 12:21:46 +0000 (07:21 -0500)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 5 Sep 2024 23:37:25 +0000 (08:37 +0900)
This is needed to ensure LOCK_{EX,SH} are defined in certain
environments, including uclibc-ng and musl libc.

src/basic/lock-util.h

index 8fb4757968c08e60b63f067850f803c3bd26a17e..a67d8b2c931f4085ed866a6d5ea5e452ad8ab5c8 100644 (file)
@@ -2,6 +2,8 @@
 #pragma once
 
 #include <fcntl.h>
+/* Include here so consumers have LOCK_{EX,SH,NB} available. */
+#include <sys/file.h>
 
 typedef struct LockFile {
         int dir_fd;