summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjirka-h <hladky.jiri@gmail.com>2020-05-11 16:02:47 +0200
committerGitHub <noreply@github.com>2020-05-11 16:02:47 +0200
commit64dcb6740a5423c6b08f298645746feff927d1ce (patch)
tree2aa9bccda816f2d76781817aa944dffb85f43fbe
parentMerge pull request #30 from trofi/master (diff)
parentdon't use SOCK_CLOEXEC or SOCK_NONBLOCK if not available (diff)
downloadhaveged-64dcb6740a5423c6b08f298645746feff927d1ce.tar.xz
haveged-64dcb6740a5423c6b08f298645746feff927d1ce.zip
Merge pull request #28 from johnou/patch-1
don't use SOCK_CLOEXEC or SOCK_NONBLOCK if not available
-rw-r--r--src/havegecmd.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/havegecmd.h b/src/havegecmd.h
index 0bc74fd..e928265 100644
--- a/src/havegecmd.h
+++ b/src/havegecmd.h
@@ -33,6 +33,14 @@ extern "C" {
#define HAVEGED_SOCKET_PATH "\0/sys/entropy/haveged"
#define MAGIC_CHROOT 'R'
+
+#ifndef SOCK_CLOEXEC
+#define SOCK_CLOEXEC 0
+#endif
+
+#ifndef SOCK_NONBLOCK
+#define SOCK_NONBLOCK 0
+#endif
/**
* Open and listen on a UNIX socket to get command from there