aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrent Cook <busterb@gmail.com>2015-05-23 19:23:55 -0500
committerBrent Cook <busterb@gmail.com>2015-05-23 19:27:57 -0500
commitbc70c1c2c1f19375d4442c1efbe324cc7a205121 (patch)
treeba665978305c017d5beb60a4e079ace4d7185b76
parent901ea927ce87fe739ff2688d43bfdc3eae506b1e (diff)
downloadportable-bc70c1c2c1f19375d4442c1efbe324cc7a205121.tar.gz
portable-bc70c1c2c1f19375d4442c1efbe324cc7a205121.tar.bz2
portable-bc70c1c2c1f19375d4442c1efbe324cc7a205121.zip
patch in std headers and C++ support for tls.h
-rw-r--r--patches/tls.h.patch25
-rwxr-xr-xupdate.sh4
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 */
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
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
66sed -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 67patch -p0 < patches/tls.h.patch
68$CP include/tls.h libtls-standalone/include 68$CP include/tls.h libtls-standalone/include
69 69
70for i in crypto/compat libtls-standalone/compat; do 70for i in crypto/compat libtls-standalone/compat; do