From bc70c1c2c1f19375d4442c1efbe324cc7a205121 Mon Sep 17 00:00:00 2001 From: Brent Cook Date: Sat, 23 May 2015 19:23:55 -0500 Subject: patch in std headers and C++ support for tls.h --- patches/tls.h.patch | 25 +++++++++++++++++++++++++ update.sh | 4 ++-- 2 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 patches/tls.h.patch diff --git a/patches/tls.h.patch b/patches/tls.h.patch new file mode 100644 index 0000000..e537132 --- /dev/null +++ b/patches/tls.h.patch @@ -0,0 +1,25 @@ +--- include/tls.h.orig 2015-05-23 19:18:30.002576267 -0500 ++++ include/tls.h 2015-05-23 19:18:09.830576581 -0500 +@@ -18,6 +18,13 @@ + #ifndef HEADER_TLS_H + #define HEADER_TLS_H + ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++#include ++#include ++ + #define TLS_API 20141031 + + #define TLS_PROTOCOL_TLSv1_0 (1 << 1) +@@ -88,4 +95,8 @@ + + uint8_t *tls_load_file(const char *_file, size_t *_len, char *_password); + ++#ifdef __cplusplus ++} ++#endif ++ + #endif /* HEADER_TLS_H */ diff --git a/update.sh b/update.sh index 1b36ba8..722c637 100755 --- a/update.sh +++ b/update.sh @@ -63,8 +63,8 @@ $CP $libssl_src/src/crypto/opensslfeatures.h include/openssl $CP $libssl_src/src/e_os2.h include/openssl $CP $libssl_src/src/ssl/pqueue.h include -sed -e "s/#define HEADER_TLS_H/#define HEADER_TLS_H\n#include \n#include /" \ - $libtls_src/tls.h > include/tls.h +$CP $libtls_src/tls.h include/tls.h +patch -p0 < patches/tls.h.patch $CP include/tls.h libtls-standalone/include for i in crypto/compat libtls-standalone/compat; do -- cgit v1.2.3-55-g6feb