From f25c030a208def9e6f8d05dcf6ea8d37a67b9b81 Mon Sep 17 00:00:00 2001 From: David Capello Date: Mon, 4 Apr 2016 11:11:57 -0300 Subject: [PATCH] Fix issues compiling base/fs_unix.h on FreeBSD (close #1016) --- src/base/fs_unix.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/base/fs_unix.h b/src/base/fs_unix.h index 77e4e790d..17290f937 100644 --- a/src/base/fs_unix.h +++ b/src/base/fs_unix.h @@ -1,5 +1,5 @@ // Aseprite Base Library -// Copyright (c) 2001-2013, 2015 David Capello +// Copyright (c) 2001-2016 David Capello // // This file is released under the terms of the MIT license. // Read LICENSE.txt for more information. @@ -9,6 +9,8 @@ #include #include +#include // Required for PATH_MAX +#include // Required for rename() #include #include #include @@ -56,7 +58,7 @@ size_t file_size(const std::string& path) void move_file(const std::string& src, const std::string& dst) { - int result = rename(src.c_str(), dst.c_str()); + int result = std::rename(src.c_str(), dst.c_str()); if (result != 0) // TODO add errno into the exception throw std::runtime_error("Error moving file");