~zethra/public-inbox

file-locker: Fix build on FreeBSD v1 APPLIED

Greg V: 1
 Fix build on FreeBSD

 1 files changed, 4 insertions(+), 0 deletions(-)
#268492 .build.yml success
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~zethra/public-inbox/patches/11798/mbox | git am -3
Learn more about email & git

[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