pkgsrc-ng/devel/libuuid/patches/patch-lib_randutils.c
2016-01-21 23:40:00 +01:00

19 lines
424 B
C

$NetBSD: patch-lib_randutils.c,v 1.1 2014/05/11 04:59:07 pho Exp $
O_CLOEXEC is not available on every platform (e.g. MacOS X < 10.7). It
was introduced in POSIX 2008.
--- lib/randutils.c.orig 2014-04-23 13:28:29.000000000 +0000
+++ lib/randutils.c
@@ -28,6 +28,10 @@
THREAD_LOCAL unsigned short ul_jrand_seed[3];
#endif
+#if !defined(O_CLOEXEC)
+#define O_CLOEXEC 0
+#endif
+
int random_get_fd(void)
{
int i, fd;