summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2019-02-06 08:37:39 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2019-02-06 08:37:39 +0000
commit92f85920b02ad5c9c4262c2c17778f69779c0604 (patch)
tree76eaa179034157090cbcf81d4301d69ff2d8db24 /src
parent97879c1e67d0e669f13922295844f0ceb64cd13b (diff)
downloadskalibs-92f85920b02ad5c9c4262c2c17778f69779c0604.tar.xz
Rename mkLtemp to mkhtemp; try to make MacOS happy
Diffstat (limited to 'src')
-rw-r--r--src/include/skalibs/nonposix.h7
-rw-r--r--src/include/skalibs/posixplz.h2
-rw-r--r--src/libposixplz/mkhtemp.c (renamed from src/libposixplz/mkLtemp.c)2
-rw-r--r--src/libstddjb/env_dump.c2
4 files changed, 11 insertions, 2 deletions
diff --git a/src/include/skalibs/nonposix.h b/src/include/skalibs/nonposix.h
index 3ef4e99..be7e90d 100644
--- a/src/include/skalibs/nonposix.h
+++ b/src/include/skalibs/nonposix.h
@@ -53,6 +53,13 @@
#endif
+ /* MacOS: needs this for full SUSv3 conformance. Don't ask. */
+
+#ifndef _DARWIN_C_SOURCE
+#define _DARWIN_C_SOURCE
+#endif
+
+
/* Unfortunately we can't fully avoid #ifdef forests,
because the BSDs are bloody snowflakes. See: setgroups(). */
diff --git a/src/include/skalibs/posixplz.h b/src/include/skalibs/posixplz.h
index f1b54d3..dda66ee 100644
--- a/src/include/skalibs/posixplz.h
+++ b/src/include/skalibs/posixplz.h
@@ -51,7 +51,7 @@ extern int mkfiletemp (char *, createfunc_t_ref, mode_t, void *) ;
extern int mklinktemp (char const *, char *, linkfunc_t_ref) ;
extern int mkptemp (char *) ;
extern int mkltemp (char const *, char *) ;
-extern int mkLtemp (char const *, char *) ;
+extern int mkhtemp (char const *, char *) ;
extern int mkctemp (char *, mode_t, dev_t) ;
extern int mkbtemp (char *, mode_t, dev_t) ;
diff --git a/src/libposixplz/mkLtemp.c b/src/libposixplz/mkhtemp.c
index 5c9ccb0..0555ef3 100644
--- a/src/libposixplz/mkLtemp.c
+++ b/src/libposixplz/mkhtemp.c
@@ -4,7 +4,7 @@
#include <skalibs/posixplz.h>
-int mkLtemp (char const *src, char *dst)
+int mkhtemp (char const *src, char *dst)
{
return mklinktemp(src, dst, &link) ;
}
diff --git a/src/libstddjb/env_dump.c b/src/libstddjb/env_dump.c
index e15c6be..fc79bc3 100644
--- a/src/libstddjb/env_dump.c
+++ b/src/libstddjb/env_dump.c
@@ -1,5 +1,7 @@
/* ISC license. */
+#include <skalibs/nonposix.h>
+#include <unistd.h>
#include <sys/stat.h>
#include <string.h>
#include <errno.h>