summaryrefslogtreecommitdiffstats
path: root/openbsd-compat/openbsd-compat.h
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2017-06-01 15:25:13 +1000
committerDamien Miller <djm@mindrot.org>2017-06-01 15:25:13 +1000
commit151c6e433a5f5af761c78de87d7b5d30a453cf5e (patch)
tree77cdffcee99995b20821a8f2a957504e861475d5 /openbsd-compat/openbsd-compat.h
parent01e6f78924da308447e71e9a32c8a6104ef4e888 (diff)
add recallocarray replacement and dependency
recallocarray() needs getpagesize() so add a tiny replacement for that.
Diffstat (limited to 'openbsd-compat/openbsd-compat.h')
-rw-r--r--openbsd-compat/openbsd-compat.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/openbsd-compat/openbsd-compat.h b/openbsd-compat/openbsd-compat.h
index cff54774..a741bc23 100644
--- a/openbsd-compat/openbsd-compat.h
+++ b/openbsd-compat/openbsd-compat.h
@@ -60,6 +60,10 @@ int bindresvport_sa(int sd, struct sockaddr *sa);
void closefrom(int);
#endif
+#ifndef HAVE_GETPAGESIZE
+int getpagesize(void);
+#endif
+
#ifndef HAVE_GETCWD
char *getcwd(char *pt, size_t size);
#endif
@@ -68,6 +72,10 @@ char *getcwd(char *pt, size_t size);
void *reallocarray(void *, size_t, size_t);
#endif
+#ifndef HAVE_RECALLOCARRAY
+void *recallocarray(void *, size_t, size_t, size_t);
+#endif
+
#if !defined(HAVE_REALPATH) || defined(BROKEN_REALPATH)
/*
* glibc's FORTIFY_SOURCE can redefine this and prevent us picking up the