Skip to content

Commit 2cadc86

Browse files
committed
Use C++ standard library function instead of POSIX function
1 parent 972c08d commit 2cadc86

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
@@ -136,5 +136,5 @@ std::string get_temporary_file(
136136
temporary_filet::~temporary_filet()
137137
{
138138
if(!name.empty())
139-
unlink(name.c_str());
139+
std::remove(name.c_str());
140140
}

0 commit comments

Comments
 (0)