From a4f89aae9fae993abebe25e5c9653c14464fa8c5 Mon Sep 17 00:00:00 2001 From: Jakub Kruszona-Zawadzki Date: Wed, 13 May 2020 10:24:00 +0200 Subject: [PATCH] (mfsio/nbd) fixed compile issue on systems without LOCK_* constants (issue #366) --- buildno.txt | 2 +- mfsclient/mfsio.h | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/buildno.txt b/buildno.txt index 44acfeb..87577dc 100644 --- a/buildno.txt +++ b/buildno.txt @@ -1 +1 @@ -1201 +1202 diff --git a/mfsclient/mfsio.h b/mfsclient/mfsio.h index 5385cc0..fb1c8ee 100644 --- a/mfsclient/mfsio.h +++ b/mfsclient/mfsio.h @@ -29,6 +29,19 @@ typedef struct _mfscfg { # define UTIME_OMIT ((1l << 30) - 2l) #endif +#ifndef LOCK_SH +#define LOCK_SH 1 +#endif +#ifndef LOCK_EX +#define LOCK_EX 2 +#endif +#ifndef LOCK_NB +#define LOCK_NB 4 +#endif +#ifndef LOCK_UN +#define LOCK_UN 8 +#endif + int mfs_mknod(const char *path, mode_t mode, dev_t dev); int mfs_unlink(const char *path); int mfs_mkdir(const char *path, mode_t mode);