summaryrefslogtreecommitdiffhomepage
path: root/dbutil.h
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2015-02-19 22:33:51 +0800
committerMatt Johnston <matt@ucc.asn.au>2015-02-19 22:33:51 +0800
commit86a717c80c29c6431d90b6c0f3c21d09a1034c09 (patch)
tree939883c76e115588cab10be4bbcc9d2fb32bae2e /dbutil.h
parent76a3eb393c021905736f79e7e048017f664b2430 (diff)
fallback for old glibc and fastopen
memset rather than = {0} initialiser --HG-- branch : fastopen
Diffstat (limited to 'dbutil.h')
-rw-r--r--dbutil.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/dbutil.h b/dbutil.h
index c82e494..b4a8f42 100644
--- a/dbutil.h
+++ b/dbutil.h
@@ -80,6 +80,13 @@ void set_sock_priority(int sock, enum dropbear_prio prio);
#if defined(__linux__) && HAVE_SENDMSG
#define DROPBEAR_TCP_FAST_OPEN
void set_listen_fast_open(int sock);
+/* may be supported by kernel but not libc */
+#ifndef TCP_FASTOPEN
+#define TCP_FASTOPEN 23
+#endif
+#ifndef MSG_FASTOPEN
+#define MSG_FASTOPEN 0x20000000
+#endif
#endif
int dropbear_listen(const char* address, const char* port,