routing/cjdns/patches/010-fix-musl-build.patch
Daniel Golle cd765e581d cjdns: import package from github.com:SeattleMeshnet/meshbox
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2015-04-17 14:50:16 +02:00

29 lines
872 B
Diff

Index: cjdns-649e26c7d61ccc66c20e87e1e3d381f9ef0cfcb0/crypto/random/seed/LinuxRandomUuidSysctlRandomSeed.c
===================================================================
--- cjdns-649e26c7d61ccc66c20e87e1e3d381f9ef0cfcb0.orig/crypto/random/seed/LinuxRandomUuidSysctlRandomSeed.c
+++ cjdns-649e26c7d61ccc66c20e87e1e3d381f9ef0cfcb0/crypto/random/seed/LinuxRandomUuidSysctlRandomSeed.c
@@ -18,6 +18,8 @@
#include "util/Hex.h"
#include <unistd.h>
+
+#ifdef __GLIBC__
#include <sys/sysctl.h>
static int getUUID(uint64_t output[2])
@@ -42,6 +44,15 @@ static int get(struct RandomSeed* random
return 0;
}
+#else
+
+static int get(struct RandomSeed* randomSeed, uint64_t output[8])
+{
+ return -1;
+}
+
+#endif
+
struct RandomSeed* LinuxRandomUuidSysctlRandomSeed_new(struct Allocator* alloc)
{
return Allocator_clone(alloc, (&(struct RandomSeed) {