Define TCPI_OPT_SYN_DATA if it isn't defined
authorChristopher Dykes <cdykes@fb.com>
Tue, 12 Jul 2016 21:58:19 +0000 (14:58 -0700)
committerFacebook Github Bot 1 <facebook-github-bot-1-bot@fb.com>
Tue, 12 Jul 2016 22:10:05 +0000 (15:10 -0700)
Summary: Because it doesn't in a lot of our open-source builds.

Differential Revision: D3551445

fbshipit-source-id: 599f45f51d1cbecedd02cb2ca3ef611648986039

folly/detail/SocketFastOpen.cpp

index 31917eabbe2c2555902b0e3829d81eb8f912f0a2..6ac35f94aa226006a9492f79375703905a456304 100644 (file)
@@ -36,6 +36,10 @@ namespace detail {
 #define TCP_FASTOPEN 23
 #endif
 
+#if !defined(TCPI_OPT_SYN_DATA)
+#define TCPI_OPT_SYN_DATA 32
+#endif
+
 ssize_t tfo_sendmsg(int sockfd, const struct msghdr* msg, int flags) {
   flags |= MSG_FASTOPEN;
   return sendmsg(sockfd, msg, flags);