Il 16/06/20 06:00, dropbear-requ...@ucc.asn.au ha scritto:

Dropbear 2020.79 is now released.

Hello,
I can't compile DB 2020.79 with uClibc-ng (1.0.32, looking at the 1.0.34 sources nothing has 
changed) unless I add "#define _GNU_SOURCE" on top of "dbrandom.c" (it is 
required by sys/random.h, line 11 
https://cgit.uclibc-ng.org/cgi/cgit/uclibc-ng.git/tree/libc/sysdeps/linux/common/sys/random.h).

The alternative is to #include <linux/random.h> manually.
Which is best?
Cheers

diff -Naubr dropbear-2020.79.old/config.h.in dropbear-2020.79.new/config.h.in
--- dropbear-2020.79.old/config.h.in    2020-06-15 17:38:40.000000000 +0200
+++ dropbear-2020.79.new/config.h.in    2020-06-22 12:31:03.000000000 +0200
@@ -162,6 +162,9 @@
 /* Define to 1 if you have the <linux/pkt_sched.h> header file. */
 #undef HAVE_LINUX_PKT_SCHED_H
+/* Define to 1 if you have the <linux/random.h> header file. */
+#undef HAVE_LINUX_RANDOM_H
+
 /* Have login() function */
 #undef HAVE_LOGIN
diff -Naubr dropbear-2020.79.old/configure.ac dropbear-2020.79.new/configure.ac
--- dropbear-2020.79.old/configure.ac   2020-06-15 17:38:08.000000000 +0200
+++ dropbear-2020.79.new/configure.ac   2020-06-22 12:31:03.000000000 +0200
@@ -371,7 +371,7 @@
        pty.h libutil.h libgen.h inttypes.h stropts.h utmp.h \
        utmpx.h lastlog.h paths.h util.h netdb.h security/pam_appl.h \
        pam/pam_appl.h netinet/in_systm.h sys/uio.h linux/pkt_sched.h \
-       sys/random.h])
+       sys/random.h linux/random.h])
# Checks for typedefs, structures, and compiler characteristics.
 AC_C_CONST
diff -Naubr dropbear-2020.79.old/includes.h dropbear-2020.79.new/includes.h
--- dropbear-2020.79.old/includes.h     2020-06-15 17:38:08.000000000 +0200
+++ dropbear-2020.79.new/includes.h     2020-06-22 12:31:03.000000000 +0200
@@ -127,6 +127,9 @@
 #ifdef HAVE_SYS_RANDOM_H
 #include <sys/random.h>
 #endif
+#ifdef HAVE_LINUX_RANDOM_H
+#include <linux/random.h>
+#endif
#ifdef BUNDLED_LIBTOM
 #include "libtomcrypt/src/headers/tomcrypt.h"
diff -Naubr dropbear-2020.79.old/configure dropbear-2020.79.new/configure
--- dropbear-2020.79.old/configure      2020-06-15 17:38:40.000000000 +0200
+++ dropbear-2020.79.new/configure      2020-06-22 12:31:03.000000000 +0200
@@ -5685,7 +5685,7 @@
        pty.h libutil.h libgen.h inttypes.h stropts.h utmp.h \
        utmpx.h lastlog.h paths.h util.h netdb.h security/pam_appl.h \
        pam/pam_appl.h netinet/in_systm.h sys/uio.h linux/pkt_sched.h \
-       sys/random.h
+       sys/random.h linux/random.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" 
"$ac_includes_default"


--
/\/ / /-<

Reply via email to