Skip to content

Commit 17244b3

Browse files
authored
Add missing #include <unistd.h> (#975)
After the call to unlink() was added to util/io/file.cpp starting with v2.2.3, the build fails on toolchains that do not transitively include unistd.h, such as FreeBSD 15.1. POSIX specifies that this function is declared in unistd.h, so add the missing #include.
1 parent f7cd177 commit 17244b3

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/util/io/file.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
2121
#ifdef _WIN32
2222
#include <io.h>
2323
#include <fcntl.h>
24+
#else
25+
#include <unistd.h> // unlink
2426
#endif
2527
#include <string.h> // strerror
2628
#include "file.h"

0 commit comments

Comments
 (0)