View | Details | Raw Unified | Return to bug 198491
Collapse All | Expand All

(-)irc/unreal/files/patch-configure (+50 lines)
Line 0 Link Here
1
--- configure.orig	2014-07-26 17:42:10.000000000 +0200
2
+++ configure	2015-02-22 19:50:14.434640148 +0100
3
@@ -3876,6 +3876,47 @@
4
 
5
 
6
 
7
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for RAND_egd in -lcrypto" >&5
8
+$as_echo_n "checking for RAND_egd in -lcrypto... " >&6; }
9
+if ${ac_cv_lib_crypto_RAND_egd+:} false; then :
10
+  $as_echo_n "(cached) " >&6
11
+else
12
+  ac_check_lib_save_LIBS=$LIBS
13
+LIBS="-lcrypto  $LIBS"
14
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15
+/* end confdefs.h.  */
16
+
17
+/* Override any GCC internal prototype to avoid an error.
18
+   Use char because int might match the return type of a GCC
19
+   builtin and then its argument prototype would still apply.  */
20
+#ifdef __cplusplus
21
+extern "C"
22
+#endif
23
+char RAND_egd ();
24
+int
25
+main ()
26
+{
27
+return RAND_egd ();
28
+  ;
29
+  return 0;
30
+}
31
+_ACEOF
32
+if ac_fn_c_try_link "$LINENO"; then :
33
+  ac_cv_lib_crypto_RAND_egd=yes
34
+else
35
+  ac_cv_lib_crypto_RAND_egd=no
36
+fi
37
+rm -f core conftest.err conftest.$ac_objext \
38
+    conftest$ac_exeext conftest.$ac_ext
39
+LIBS=$ac_check_lib_save_LIBS
40
+fi
41
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_RAND_egd" >&5
42
+$as_echo "$ac_cv_lib_crypto_RAND_egd" >&6; }
43
+if test "x$ac_cv_lib_crypto_RAND_egd" = xyes; then :
44
+
45
+$as_echo "#define HAVE_RAND_EGD 1" >>confdefs.h
46
+
47
+fi
48
 
49
 
50
 
(-)irc/unreal/files/patch-configure.ac (+11 lines)
Line 0 Link Here
1
--- configure.ac.orig	2014-07-26 17:42:10.000000000 +0200
2
+++ configure.ac	2015-02-22 18:05:11.071679127 +0100
3
@@ -93,6 +93,8 @@
4
 AC_CHECK_LIB(nsl, inet_ntoa,
5
 	[IRCDLIBS="$IRCDLIBS-lnsl "
6
 		INETLIB="-lnsl"])
7
+AC_CHECK_LIB(crypto, RAND_egd, 
8
+		AC_DEFINE(HAVE_RAND_EGD, 1, [Define if the libcrypto has RAND_egd]))
9
 
10
 AC_SUBST(IRCDLIBS)
11
 AC_SUBST(MKPASSWDLIBS)
(-)irc/unreal/files/patch-include_dynconf.h (+14 lines)
Line 0 Link Here
1
--- include/dynconf.h.orig	2014-07-26 17:42:10.000000000 +0200
2
+++ include/dynconf.h	2015-02-25 20:44:09.939110131 +0100
3
@@ -204,7 +204,11 @@
4
 #define SHOWCONNECTINFO			iConf.show_connect_info
5
 #define OPER_ONLY_STATS			iConf.oper_only_stats
6
 #define ANTI_SPAM_QUIT_MSG_TIME		iConf.anti_spam_quit_message_time
7
+#ifdef HAVE_RAND_EGD
8
 #define USE_EGD				iConf.use_egd
9
+#else
10
+#define USE_EGD				0
11
+#endif
12
 #define EGD_PATH			iConf.egd_path
13
 
14
 #define ircnetwork			iConf.network.x_ircnetwork
(-)irc/unreal/files/patch-src_random.c (+20 lines)
Line 0 Link Here
1
--- src/random.c.orig	2014-07-26 17:42:10.000000000 +0200
2
+++ src/random.c	2015-02-25 20:49:36.769099626 +0100
3
@@ -163,7 +163,7 @@
4
 void init_random()
5
 {
6
 struct {
7
-#ifdef USE_SSL
8
+#if defined(USE_SSL)
9
 	char egd[32];			/* from EGD */
10
 #endif
11
 #ifndef _WIN32
12
@@ -187,7 +187,7 @@
13
 
14
 	/* Grab non-OS specific "random" data */
15
 #ifdef USE_SSL
16
- #if OPENSSL_VERSION_NUMBER >= 0x000907000
17
+ #if OPENSSL_VERSION_NUMBER >= 0x000907000 && defined(HAVE_RAND_EGD)
18
 	if (EGD_PATH) {
19
 		n = RAND_query_egd_bytes(EGD_PATH, rdat.egd, sizeof(rdat.egd));
20
 	}

Return to bug 198491