aboutsummaryrefslogtreecommitdiffstats
path: root/doc/examples
diff options
context:
space:
mode:
authorlloyd <[email protected]>2013-12-31 18:56:47 +0000
committerlloyd <[email protected]>2013-12-31 18:56:47 +0000
commitc07aa8c37d016f5b8fa78a95b37093b3b8d991e3 (patch)
tree34dc3195062d90471b7ce1a66224cbb983fbc3d2 /doc/examples
parentff380dedf10007a1bc0f4b7b874a9424bc6e1e4a (diff)
Add MSG_NOSIGNAL as 0 on platforms that don't have it.
Patch from Uri Blumenthal <[email protected]> sent to the list.
Diffstat (limited to 'doc/examples')
-rw-r--r--doc/examples/tls_client.cpp4
-rw-r--r--doc/examples/tls_server.cpp4
2 files changed, 8 insertions, 0 deletions
diff --git a/doc/examples/tls_client.cpp b/doc/examples/tls_client.cpp
index 712a26e26..4023baba8 100644
--- a/doc/examples/tls_client.cpp
+++ b/doc/examples/tls_client.cpp
@@ -16,6 +16,10 @@
#include <errno.h>
#include <fcntl.h>
+#if !defined(MSG_NOSIGNAL)
+ #define MSG_NOSIGNAL 0
+#endif
+
#if defined(BOTAN_HAS_TLS_SQLITE3_SESSION_MANAGER)
#include <botan/tls_session_manager_sqlite.h>
#endif
diff --git a/doc/examples/tls_server.cpp b/doc/examples/tls_server.cpp
index 50c2baba6..963e03313 100644
--- a/doc/examples/tls_server.cpp
+++ b/doc/examples/tls_server.cpp
@@ -28,6 +28,10 @@ using namespace std::placeholders;
#include <errno.h>
#include <fcntl.h>
+#if !defined(MSG_NOSIGNAL)
+ #define MSG_NOSIGNAL 0
+#endif
+
int make_server_socket(const std::string& transport, u16bit port)
{
int type = (transport == "tcp") ? SOCK_STREAM : SOCK_DGRAM;