From bb8e0486b65586cb22e81ef12c088eef1dc34c1b Mon Sep 17 00:00:00 2001 From: "Niall Douglas (s [underscore] sourceforge {at} nedprod [dot] com)" Date: Fri, 8 Jun 2018 14:56:47 +0200 Subject: Fix AFIO programs, which had got broke once again. --- programs/key-value-store/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'programs') diff --git a/programs/key-value-store/main.cpp b/programs/key-value-store/main.cpp index 0675c38c..96a4eb17 100644 --- a/programs/key-value-store/main.cpp +++ b/programs/key-value-store/main.cpp @@ -46,7 +46,7 @@ namespace stackoverflow if(!_fh) { // Fetch the error code - std::error_code ec = _fh.error().ec; + std::error_code ec = make_error_code(_fh.error()); // Did we fail due to file not found? // It is *very* important to note that ec contains the *original* error code which could // be POSIX, or Win32 or NT kernel error code domains. However we can always compare, @@ -70,7 +70,7 @@ namespace stackoverflow file_handle::io_result _buffers_read = read(fh, {reqs, 0}); if(!_buffers_read) { - std::error_code ec = _fh.error().ec; + std::error_code ec = make_error_code(_fh.error()); std::cerr << "Reading the file " << path << " failed with " << ec.message() << std::endl; } // Same as before, either throw any error or unpack the value returned -- cgit v1.2.3