From cd3ab57f9b388f8b1abf601dc4d78ff82d83b75e Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Mon, 26 Feb 2018 14:37:06 +1100 Subject: Hook up flock() compat code. Also a couple of minor changes: fail if we can't lock instead of silently succeeding, and apply a couple of minor style fixes. --- openbsd-compat/bsd-misc.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'openbsd-compat/bsd-misc.h') diff --git a/openbsd-compat/bsd-misc.h b/openbsd-compat/bsd-misc.h index af2ccdae2..2a73ae45b 100644 --- a/openbsd-compat/bsd-misc.h +++ b/openbsd-compat/bsd-misc.h @@ -145,4 +145,12 @@ int raise(int); pid_t getsid(pid_t); #endif +#ifndef HAVE_FLOCK +# define LOCK_SH 0x01 +# define LOCK_EX 0x02 +# define LOCK_NB 0x04 +# define LOCK_UN 0x08 +int flock(int, int); +#endif + #endif /* _BSD_MISC_H */ -- cgit v1.2.3