aa5648d3fa8dcfe4d9d2fb7dcdea369bbd04d313
[feed/routing.git] / cjdns / patches / 010-fix-musl-build.patch
1 Index: cjdns-649e26c7d61ccc66c20e87e1e3d381f9ef0cfcb0/crypto/random/seed/LinuxRandomUuidSysctlRandomSeed.c
2 ===================================================================
3 --- cjdns-649e26c7d61ccc66c20e87e1e3d381f9ef0cfcb0.orig/crypto/random/seed/LinuxRandomUuidSysctlRandomSeed.c
4 +++ cjdns-649e26c7d61ccc66c20e87e1e3d381f9ef0cfcb0/crypto/random/seed/LinuxRandomUuidSysctlRandomSeed.c
5 @@ -18,6 +18,8 @@
6 #include "util/Hex.h"
7
8 #include <unistd.h>
9 +
10 +#ifdef __GLIBC__
11 #include <sys/sysctl.h>
12
13 static int getUUID(uint64_t output[2])
14 @@ -42,6 +44,15 @@ static int get(struct RandomSeed* random
15 return 0;
16 }
17
18 +#else
19 +
20 +static int get(struct RandomSeed* randomSeed, uint64_t output[8])
21 +{
22 + return -1;
23 +}
24 +
25 +#endif
26 +
27 struct RandomSeed* LinuxRandomUuidSysctlRandomSeed_new(struct Allocator* alloc)
28 {
29 return Allocator_clone(alloc, (&(struct RandomSeed) {