diff options
| -rw-r--r-- | patches/tls.h.patch | 25 | ||||
| -rwxr-xr-x | update.sh | 4 |
2 files changed, 27 insertions, 2 deletions
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 @@ | |||
| 1 | --- include/tls.h.orig 2015-05-23 19:18:30.002576267 -0500 | ||
| 2 | +++ include/tls.h 2015-05-23 19:18:09.830576581 -0500 | ||
| 3 | @@ -18,6 +18,13 @@ | ||
| 4 | #ifndef HEADER_TLS_H | ||
| 5 | #define HEADER_TLS_H | ||
| 6 | |||
| 7 | +#ifdef __cplusplus | ||
| 8 | +extern "C" { | ||
| 9 | +#endif | ||
| 10 | + | ||
| 11 | +#include <stddef.h> | ||
| 12 | +#include <stdint.h> | ||
| 13 | + | ||
| 14 | #define TLS_API 20141031 | ||
| 15 | |||
| 16 | #define TLS_PROTOCOL_TLSv1_0 (1 << 1) | ||
| 17 | @@ -88,4 +95,8 @@ | ||
| 18 | |||
| 19 | uint8_t *tls_load_file(const char *_file, size_t *_len, char *_password); | ||
| 20 | |||
| 21 | +#ifdef __cplusplus | ||
| 22 | +} | ||
| 23 | +#endif | ||
| 24 | + | ||
| 25 | #endif /* HEADER_TLS_H */ | ||
| @@ -63,8 +63,8 @@ $CP $libssl_src/src/crypto/opensslfeatures.h include/openssl | |||
| 63 | $CP $libssl_src/src/e_os2.h include/openssl | 63 | $CP $libssl_src/src/e_os2.h include/openssl |
| 64 | $CP $libssl_src/src/ssl/pqueue.h include | 64 | $CP $libssl_src/src/ssl/pqueue.h include |
| 65 | 65 | ||
| 66 | sed -e "s/#define HEADER_TLS_H/#define HEADER_TLS_H\n#include <stddef.h>\n#include <stdint.h>/" \ | 66 | $CP $libtls_src/tls.h include/tls.h |
| 67 | $libtls_src/tls.h > include/tls.h | 67 | patch -p0 < patches/tls.h.patch |
| 68 | $CP include/tls.h libtls-standalone/include | 68 | $CP include/tls.h libtls-standalone/include |
| 69 | 69 | ||
| 70 | for i in crypto/compat libtls-standalone/compat; do | 70 | for i in crypto/compat libtls-standalone/compat; do |
