Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-ports-kde
Path: blob/main/benchmarks/iorate/files/patch-ior__mach.c
16461 views
1
--- ior_mach.c.orig 2011-11-03 15:27:58 UTC
2
+++ ior_mach.c
3
@@ -41,6 +41,7 @@ static char rcsid[] = "$Header: /home/we
4
#include <time.h>
5
#include <sys/types.h>
6
#include <unistd.h>
7
+#include <sys/time.h>
8
9
/*
10
* Solaris needs ior_mach.h to be after the above or
11
@@ -411,6 +411,10 @@ int ior_dev_lock( ior_config *cfg, long
12
};
13
14
#else
15
+#if defined(IOR_LARGE_FILES) && defined(__FreeBSD__)
16
+#define IOR_SET_LOCK_FLAG F_SETLK
17
+ struct flock d_lock; /* lock command to run */
18
+#else
19
#ifdef IOR_LARGE_FILES
20
#define IOR_SET_LOCK_FLAG F_SETLK64
21
struct flock64 d_lock; /* lock command to run */
22
@@ -418,6 +422,7 @@ int ior_dev_lock( ior_config *cfg, long
23
#define IOR_SET_LOCK_FLAG F_SETLK
24
struct flock d_lock; /* lock command to run */
25
#endif
26
+#endif
27
28
result = 0; /* all OK so far */
29
30
@@ -486,6 +491,10 @@ int ior_dev_unlock( ior_config *cfg, lon
31
};
32
33
#else
34
+#if defined(IOR_LARGE_FILES) && defined(__FreeBSD__)
35
+#define IOR_SET_LOCK_FLAG F_SETLK
36
+ struct flock d_lock; /* lock command to run */
37
+#else
38
#ifdef IOR_LARGE_FILES
39
#define IOR_SET_LOCK_FLAG F_SETLK64
40
struct flock64 d_lock; /* lock command to run */
41
@@ -493,6 +502,7 @@ int ior_dev_unlock( ior_config *cfg, lon
42
#define IOR_SET_LOCK_FLAG F_SETLK
43
struct flock d_lock; /* lock command to run */
44
#endif
45
+#endif
46
47
result = 0; /* all OK so far */
48
49
50