Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/llfio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/afio/v2.0/detail/impl/posix/file_handle.ipp5
-rw-r--r--programs/benchmark-iostreams/main.cpp6
2 files changed, 8 insertions, 3 deletions
diff --git a/include/afio/v2.0/detail/impl/posix/file_handle.ipp b/include/afio/v2.0/detail/impl/posix/file_handle.ipp
index cb68f88d..7dcf286b 100644
--- a/include/afio/v2.0/detail/impl/posix/file_handle.ipp
+++ b/include/afio/v2.0/detail/impl/posix/file_handle.ipp
@@ -371,6 +371,10 @@ result<std::vector<std::pair<file_handle::extent_type, file_handle::extent_type>
for(;;)
{
#ifdef __linux__
+#ifndef SEEK_DATA
+ errno = EINVAL;
+ break;
+#else
start = lseek64(_v.fd, end, SEEK_DATA);
if(static_cast<extent_type>(-1) == start)
{
@@ -381,6 +385,7 @@ result<std::vector<std::pair<file_handle::extent_type, file_handle::extent_type>
{
break;
}
+#endif
#elif defined(__APPLE__)
// Can't find any support for extent enumeration in OS X
errno = EINVAL;
diff --git a/programs/benchmark-iostreams/main.cpp b/programs/benchmark-iostreams/main.cpp
index ed5eeee2..9d192a98 100644
--- a/programs/benchmark-iostreams/main.cpp
+++ b/programs/benchmark-iostreams/main.cpp
@@ -26,7 +26,7 @@ Distributed under the Boost Software License, Version 1.0.
#define REGIONSIZE (100 * 1024 * 1024)
#include "../../include/afio/afio.hpp"
-#include "quickcpplib/include/algorithm/small_prng.hpp"
+#include "../../include/afio/v2.0/quickcpplib/include/algorithm/small_prng.hpp"
#include <chrono>
#include <fstream>
@@ -202,10 +202,10 @@ int main()
#if 1
{
// Prefault
- volatile afio::byte *p = th.address();
+ volatile char *p = (char *) th.address(), x;
for(size_t n = 0; n < REGIONSIZE; n += 64)
{
- p[n];
+ x = p[n];
}
}
#endif