diff options
author | jdolecek <jdolecek> | 2011-01-02 17:45:05 +0000 |
---|---|---|
committer | jdolecek <jdolecek> | 2011-01-02 17:45:05 +0000 |
commit | afea3c9812408a4050bee4001ef0a76bcc5ac8d2 (patch) | |
tree | 49c55e76adc6276caf439a0529c10007b3f71deb /benchmarks/bonnie++/patches | |
parent | 3d1ae3fe06e4dc9ee1578c0c73de24f0527d9807 (diff) | |
download | pkgsrc-afea3c9812408a4050bee4001ef0a76bcc5ac8d2.tar.gz |
make compile on systems without O_DIRECT (i.e. Mac OS 10.6)
Diffstat (limited to 'benchmarks/bonnie++/patches')
-rw-r--r-- | benchmarks/bonnie++/patches/patch-ac | 27 | ||||
-rw-r--r-- | benchmarks/bonnie++/patches/patch-ad | 14 |
2 files changed, 41 insertions, 0 deletions
diff --git a/benchmarks/bonnie++/patches/patch-ac b/benchmarks/bonnie++/patches/patch-ac new file mode 100644 index 00000000000..d7d019ed70e --- /dev/null +++ b/benchmarks/bonnie++/patches/patch-ac @@ -0,0 +1,27 @@ +$NetBSD: patch-ac,v 1.1 2011/01/02 17:45:06 jdolecek Exp $ + +--- bon_io.cpp.orig 2011-01-02 17:27:11.000000000 +0000 ++++ bon_io.cpp +@@ -318,7 +318,9 @@ CFileOp::CFileOp(BonTimer &timer, int fi + , m_isopen(false) + , m_name(NULL) + , m_sync(use_sync) ++#ifdef O_DIRECT + , m_use_direct_io(use_direct_io) ++#endif + , m_chunk_bits(chunk_bits) + , m_chunk_size(1 << m_chunk_bits) + , m_chunks_per_file(Unit / m_chunk_size * IOFileSize) +@@ -393,10 +395,12 @@ int CFileOp::m_open(CPCCHAR base_name, i + createFlag = OPEN_ACTION_CREATE_IF_NEW | OPEN_ACTION_REPLACE_IF_EXISTS; + #else + flags = O_RDWR | O_CREAT | O_EXCL; ++#ifdef O_DIRECT + if(m_use_direct_io) + { + flags |= O_DIRECT; + } ++#endif /* O_DIRECT */ + #endif + } + else diff --git a/benchmarks/bonnie++/patches/patch-ad b/benchmarks/bonnie++/patches/patch-ad new file mode 100644 index 00000000000..fc0577515d6 --- /dev/null +++ b/benchmarks/bonnie++/patches/patch-ad @@ -0,0 +1,14 @@ +$NetBSD: patch-ad,v 1.1 2011/01/02 17:45:06 jdolecek Exp $ + +--- bon_io.h.orig 2011-01-02 17:28:45.000000000 +0000 ++++ bon_io.h +@@ -33,7 +33,9 @@ private: + bool m_isopen; + char *m_name; + bool m_sync; ++#ifdef O_DIRECT + bool m_use_direct_io; ++#endif + const int m_chunk_bits, m_chunk_size; + int m_chunks_per_file, m_total_chunks; + int m_last_file_chunks; |