[PATCH file-locker] Fix build on FreeBSD
Export this patch
FreeBSD (not even DragonFly, really only FreeBSD) has an extra field in libc::flock
for some kind of remote system support.
---
src/lib.rs | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/lib.rs b/src/lib.rs
index 1c18895..fc6eb0a 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -130,6 +130,8 @@ impl FileLock {
l_start: 0,
l_len: 0,
l_pid: 0,
+ #[cfg(target_os = "freebsd")]
+ l_sysid: 0,
};
let arg = if blocking {
FcntlArg::F_SETLKW(&flock)
@@ -171,6 +173,8 @@ impl FileLock {
l_start: 0,
l_len: 0,
l_pid: 0,
+ #[cfg(target_os = "freebsd")]
+ l_sysid: 0,
};
fcntl(self.file.as_raw_fd(), FcntlArg::F_SETLK(&flock))
.map_err(cver)?;
--
2.27.0
file-locker/patches/.build.yml: SUCCESS in 1m13s
[Fix build on FreeBSD][0] from [Greg V][1]
[0]: https://lists.sr.ht/~zethra/public-inbox/patches/11798
[1]: mailto:greg@unrelenting.technology
✓ #268492 SUCCESS file-locker/patches/.build.yml https://builds.sr.ht/~zethra/job/268492