Path: blob/main/benchmarks/iorate/files/patch-ior__mach.c
16461 views
--- ior_mach.c.orig 2011-11-03 15:27:58 UTC1+++ ior_mach.c2@@ -41,6 +41,7 @@ static char rcsid[] = "$Header: /home/we3#include <time.h>4#include <sys/types.h>5#include <unistd.h>6+#include <sys/time.h>78/*9* Solaris needs ior_mach.h to be after the above or10@@ -411,6 +411,10 @@ int ior_dev_lock( ior_config *cfg, long11};1213#else14+#if defined(IOR_LARGE_FILES) && defined(__FreeBSD__)15+#define IOR_SET_LOCK_FLAG F_SETLK16+ struct flock d_lock; /* lock command to run */17+#else18#ifdef IOR_LARGE_FILES19#define IOR_SET_LOCK_FLAG F_SETLK6420struct flock64 d_lock; /* lock command to run */21@@ -418,6 +422,7 @@ int ior_dev_lock( ior_config *cfg, long22#define IOR_SET_LOCK_FLAG F_SETLK23struct flock d_lock; /* lock command to run */24#endif25+#endif2627result = 0; /* all OK so far */2829@@ -486,6 +491,10 @@ int ior_dev_unlock( ior_config *cfg, lon30};3132#else33+#if defined(IOR_LARGE_FILES) && defined(__FreeBSD__)34+#define IOR_SET_LOCK_FLAG F_SETLK35+ struct flock d_lock; /* lock command to run */36+#else37#ifdef IOR_LARGE_FILES38#define IOR_SET_LOCK_FLAG F_SETLK6439struct flock64 d_lock; /* lock command to run */40@@ -493,6 +502,7 @@ int ior_dev_unlock( ior_config *cfg, lon41#define IOR_SET_LOCK_FLAG F_SETLK42struct flock d_lock; /* lock command to run */43#endif44+#endif4546result = 0; /* all OK so far */47484950