Replace use of tmpnam which warns on linux at link time

This commit is contained in:
baldurk
2019-05-23 10:29:27 +01:00
parent 69e55628c2
commit e0275bc92b
4 changed files with 15 additions and 3 deletions
+6
View File
@@ -22,6 +22,7 @@
* THE SOFTWARE.
******************************************************************************/
#include <stdlib.h>
#include "test_common.h"
std::string GetCWD()
@@ -48,4 +49,9 @@ std::string GetEnvVar(const char *var)
return data;
return "";
}
void tmpnam_via_mkstemp(char (&buf)[MAX_PATH])
{
snprintf(buf, MAX_PATH - 1, "/tmp/rdoc_tmp/%x", rand());
}