aboutsummaryrefslogtreecommitdiff
path: root/openbsd-compat/openbsd-compat.h
diff options
context:
space:
mode:
Diffstat (limited to 'openbsd-compat/openbsd-compat.h')
-rw-r--r--openbsd-compat/openbsd-compat.h23
1 files changed, 15 insertions, 8 deletions
diff --git a/openbsd-compat/openbsd-compat.h b/openbsd-compat/openbsd-compat.h
index 4316ab84bf89..4af207cdd40f 100644
--- a/openbsd-compat/openbsd-compat.h
+++ b/openbsd-compat/openbsd-compat.h
@@ -69,6 +69,10 @@ void closefrom(int);
int ftruncate(int filedes, off_t length);
#endif
+#if defined(HAVE_DECL_GETENTROPY) && HAVE_DECL_GETENTROPY == 0
+int _ssh_compat_getentropy(void *, size_t);
+#endif
+
#ifndef HAVE_GETLINE
#include <stdio.h>
ssize_t getline(char **, size_t *, FILE *);
@@ -214,21 +218,20 @@ int writev(int, struct iovec *, int);
int getpeereid(int , uid_t *, gid_t *);
#endif
-#ifdef HAVE_ARC4RANDOM
-# ifndef HAVE_ARC4RANDOM_STIR
-# define arc4random_stir()
-# endif
-#else
-unsigned int arc4random(void);
-void arc4random_stir(void);
+#ifndef HAVE_ARC4RANDOM
+uint32_t arc4random(void);
#endif /* !HAVE_ARC4RANDOM */
#ifndef HAVE_ARC4RANDOM_BUF
void arc4random_buf(void *, size_t);
#endif
+#ifndef HAVE_ARC4RANDOM_STIR
+# define arc4random_stir()
+#endif
+
#ifndef HAVE_ARC4RANDOM_UNIFORM
-u_int32_t arc4random_uniform(u_int32_t);
+uint32_t arc4random_uniform(uint32_t);
#endif
#ifndef HAVE_ASPRINTF
@@ -339,6 +342,10 @@ void freezero(void *, size_t);
struct tm *localtime_r(const time_t *, struct tm *);
#endif
+#ifndef HAVE_TIMEGM
+time_t timegm(struct tm *);
+#endif
+
char *xcrypt(const char *password, const char *salt);
char *shadow_pw(struct passwd *pw);