dropbear: fix compilation for uClibc
[openwrt/openwrt.git] / package / network / services / dropbear / patches / 001-backport_GNU_SOURCE-for-random.patch
diff --git a/package/network/services/dropbear/patches/001-backport_GNU_SOURCE-for-random.patch b/package/network/services/dropbear/patches/001-backport_GNU_SOURCE-for-random.patch
new file mode 100644 (file)
index 0000000..d9b13d7
--- /dev/null
@@ -0,0 +1,25 @@
+From 3f5c106a880a02b21739f2022746e6aa7672474c Mon Sep 17 00:00:00 2001
+From: Matt Johnston <matt@ucc.asn.au>
+Date: Tue, 23 Jun 2020 21:38:46 +0800
+Subject: [PATCH] _GNU_SOURCE for random
+
+---
+ includes.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/includes.h b/includes.h
+index e8c3e18..2789f23 100644
+--- a/includes.h
++++ b/includes.h
+@@ -125,6 +125,8 @@
+ #endif
+ #ifdef HAVE_SYS_RANDOM_H
++/* uclibc needs _GNU_SOURCE */
++#define _GNU_SOURCE
+ #include <sys/random.h>
+ #endif
+-- 
+2.25.1
+