aboutsummaryrefslogtreecommitdiffstats
path: root/testing/moosefs/moosefs-nbd.patch
blob: dc1b2326cd14437e13980551ef1249ff581511f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
From a4f89aae9fae993abebe25e5c9653c14464fa8c5 Mon Sep 17 00:00:00 2001
From: Jakub Kruszona-Zawadzki <acid@moosefs.com>
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);