Commit 01b77f0d authored by Guillem Jover's avatar Guillem Jover

Add support for GNU/kFreeBSD for closefrom() and getentropy()

parent 75729394
......@@ -136,7 +136,7 @@ closefrom_procfs(int lowfd)
int i;
/* Use /proc/self/fd (or /dev/fd on FreeBSD) if it exists. */
# if defined(__FreeBSD__) || defined(__APPLE__)
# if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__APPLE__)
path = "/dev/fd";
# else
path = "/proc/self/fd";
......
......@@ -26,7 +26,7 @@
#if defined(__linux__)
#include "getentropy_linux.c"
#elif defined(__FreeBSD__)
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
#include "arc4random_bsd.c"
#elif defined(__NetBSD__)
#include "arc4random_bsd.c"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment