summaryrefslogtreecommitdiff
path: root/net-misc/ntp/files/ntp-4.2.8_p10-fix-build-wo-ssl-or-libressl.patch
blob: 1b532c6d8931e64fdd2460f8e42c7cad0dadb74f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
Fix building with libressl or without SSL.

Origin: http://bugs.ntp.org/attachment.cgi?id=1481

LibreSSL fix from Joe Kappus (https://bugs.gentoo.org/show_bug.cgi?id=600668#c2)

--- a/include/libssl_compat.h
+++ b/include/libssl_compat.h
@@ -37,7 +37,7 @@
 #endif
 
 /* ----------------------------------------------------------------- */
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
 /* ----------------------------------------------------------------- */
 
 # include <openssl/objects.h>
--- a/libntp/libssl_compat.c
+++ b/libntp/libssl_compat.c
@@ -26,7 +26,7 @@
 /* ----------------------------------------------------------------- */
 
 /* ----------------------------------------------------------------- */
-#if defined(OPENSSL) && OPENSSL_VERSION_NUMBER < 0x10100000L
+#if defined(OPENSSL) && (OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER))
 /* ----------------------------------------------------------------- */
 
 #include "libssl_compat.h"
--- a/libntp/ssl_init.c
+++ b/libntp/ssl_init.c
@@ -21,7 +21,7 @@
 
 int ssl_init_done;
 
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
 
 static void
 atexit_ssl_cleanup(void)