Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
+/*
+ * This compat wrapper can be removed and replaced by g_mkdtemp() when we bump
+ * the requirement on glib to version 2.30.
+ */
+
#include <stdlib.h>
#include <sys/stat.h>
#include <stdlib.h>
#include <sys/stat.h>
static inline
char *bt_mkdtemp(char *template)
{
return mkdtemp(template);
}
static inline
char *bt_mkdtemp(char *template)
{
return mkdtemp(template);
}
+
+#elif GLIB_CHECK_VERSION(2,30,0)
+
+#include <glib/gstdio.h>
+static inline
+char *bt_mkdtemp(char *template)
+{
+ return g_mkdtemp(template);
+}
+
static inline
char *bt_mkdtemp(char *template)
{
static inline
char *bt_mkdtemp(char *template)
{
#endif /* _BABELTRACE_COMPAT_STDLIB_H */
#endif /* _BABELTRACE_COMPAT_STDLIB_H */