Skip to content

Commit aab593b

Browse files
committed
Use C++ standard library function instead of POSIX function
1 parent 475fe20 commit aab593b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/util/tempfile.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ Author: Daniel Kroening
2222
#include <fcntl.h>
2323

2424
#include <cstdlib>
25+
#include <cstdio>
2526
#include <cstring>
2627

2728
#if defined(__linux__) || \
@@ -31,7 +32,6 @@ Author: Daniel Kroening
3132
defined(__CYGWIN__) || \
3233
defined(__MACH__)
3334
#include <unistd.h>
34-
#include <sys/time.h>
3535
#endif
3636

3737
/// Substitute for mkstemps (OpenBSD standard) for Windows, where it is
@@ -133,5 +133,5 @@ std::string get_temporary_file(
133133
temporary_filet::~temporary_filet()
134134
{
135135
if(!name.empty())
136-
unlink(name.c_str());
136+
std::remove(name.c_str());
137137
}

0 commit comments

Comments
 (0)