From 4ae82c64d8f219666c2f8315a8a5ab9e30a1c1af Mon Sep 17 00:00:00 2001 From: Igor Pashev Date: Sat, 29 Oct 2022 15:37:18 +0200 Subject: WIP --- src/lib/cfuns-c.cxx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/lib/cfuns-c.cxx') diff --git a/src/lib/cfuns-c.cxx b/src/lib/cfuns-c.cxx index 5dbcd6bc..5cb5f338 100644 --- a/src/lib/cfuns-c.cxx +++ b/src/lib/cfuns-c.cxx @@ -34,7 +34,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "openaxiom-c-macros.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include #include @@ -501,11 +503,11 @@ oa_acquire_temporary_pathname() { } return strdup(buf); #elif HAVE_DECL_MKTEMP - return mktemp(copy_c_str(std::string{ oa_get_tmpdir() } + "/oa-XXXXXX")); + return mktemp(strdup((std::string{ oa_get_tmpdir() } + "/oa-XXXXXX").c_str())); #elif HAVE_DECL_TEMPNAM return tempnam(oa_get_tmpdir(), "oa-"); #else - return copy_c_str("oa-" + std::to_string(random())); + return strdup(("oa-" + std::to_string(random())).c_str()); #endif } -- cgit v1.2.3