summaryrefslogtreecommitdiff
path: root/src/shared/util.h
diff options
context:
space:
mode:
authorPeter Seiderer <ps.report@gmx.net>2015-01-25 14:00:27 -0500
committerAnthony G. Basile <blueness@gentoo.org>2015-01-25 14:00:27 -0500
commit2242855594e38a84ec5ce76134c4bc8c164cdf32 (patch)
treeba1ac915757ba178adb0701ee9795d5ff3452f83 /src/shared/util.h
parent5e7fcb69f1821473754378b461d1bf16aa3a1cb3 (diff)
src/shared/util.{c,h}: fix build when mkostemp is not supported
Not all instance of mkostemp were protected with #ifndef HAVE_DECL_MKOSTEMP. We fix this for the definition of the wrapper mkostemp_safe() in the c file and in the header. Signed-off-by: Peter Seiderer <ps.report@gmx.net> Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'src/shared/util.h')
-rw-r--r--src/shared/util.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/shared/util.h b/src/shared/util.h
index bce4f0fa77..3f3d879a13 100644
--- a/src/shared/util.h
+++ b/src/shared/util.h
@@ -451,8 +451,11 @@ static inline void qsort_safe(void *base, size_t nmemb, size_t size,
int proc_cmdline(char **ret);
int getpeercred(int fd, struct ucred *ucred);
+#if HAVE_DECL_MKOSTEMP
int mkostemp_safe(char *pattern, int flags);
+#else
int mkstemp_safe(char *pattern);
+#endif
union file_handle_union {
struct file_handle handle;