summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/Configuration.cpp4
-rw-r--r--tests/ingen_bench.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/Configuration.cpp b/src/Configuration.cpp
index 67a91dae..7d3d9c40 100644
--- a/src/Configuration.cpp
+++ b/src/Configuration.cpp
@@ -290,8 +290,8 @@ Configuration::save(URIMap& uri_map,
}
// Attempt to open file for writing
- const std::unique_ptr<FILE, decltype(&fclose)> file{fopen(path.c_str(), "w"),
- &fclose};
+ const std::unique_ptr<FILE, int (*)(FILE*)> file{
+ fopen(path.c_str(), "w"), &fclose};
if (!file) {
throw FileError(fmt("Failed to open file %1% (%2%)",
path, strerror(errno)));
diff --git a/tests/ingen_bench.cpp b/tests/ingen_bench.cpp
index d840eea9..82fae78d 100644
--- a/tests/ingen_bench.cpp
+++ b/tests/ingen_bench.cpp
@@ -127,8 +127,8 @@ run(int argc, char** argv)
const uint64_t t_end = clock.now_microseconds();
// Write log output
- const std::unique_ptr<FILE, decltype(&fclose)> log{fopen(out_file.c_str(), "a"),
- &fclose};
+ const std::unique_ptr<FILE, int (*)(FILE*)> log{fopen(out_file.c_str(), "a"),
+ &fclose};
if (ftell(log.get()) == 0) {
fprintf(log.get(), "# n_threads\trun_time\treal_time\n");
}