summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPhilip Guenther <guenther@cvs.openbsd.org>2024-08-02 01:53:22 +0000
committerPhilip Guenther <guenther@cvs.openbsd.org>2024-08-02 01:53:22 +0000
commit0f7451ad421bc9f8573147b7669baf5fed22d84b (patch)
treee6b2acb3422b52def4d72aa56f52563fdc8735c9 /include
parentc5fb7250d82c9a7f0eac87e5aa6eaa8ff9797bef (diff)
getentropy(2) is in POSIX-2024, so adjust the #include visibility,
change the "too much" error to EINVAL, add GETENTROPY_MAX to <limits.h> (via sys/syslimits.h), and update the manpage. ok deraadt@
Diffstat (limited to 'include')
-rw-r--r--include/unistd.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/unistd.h b/include/unistd.h
index 1fda33a9cda..04972072f96 100644
--- a/include/unistd.h
+++ b/include/unistd.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: unistd.h,v 1.109 2024/05/18 05:20:22 guenther Exp $ */
+/* $OpenBSD: unistd.h,v 1.110 2024/08/02 01:53:21 guenther Exp $ */
/* $NetBSD: unistd.h,v 1.26.4.1 1996/05/28 02:31:51 mrg Exp $ */
/*-
@@ -471,6 +471,10 @@ int symlinkat(const char *, int, const char *);
int unlinkat(int, const char *, int);
#endif
+#if __POSIX_VISIBLE >= 202405 || __BSD_VISIBLE
+int getentropy(void *, size_t);
+#endif
+
#if __BSD_VISIBLE
int dup3(int, int, int);
int pipe2(int [2], int);
@@ -525,7 +529,6 @@ int setthrname(pid_t, const char *);
void setusershell(void);
int strtofflags(char **, u_int32_t *, u_int32_t *);
int swapctl(int cmd, const void *arg, int misc);
-int getentropy(void *, size_t);
int pledge(const char *, const char *);
int unveil(const char *, const char *);
pid_t __tfork_thread(const struct __tfork *, size_t, void (*)(void *),