X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=folly%2Fportability%2FSockets.h;h=99f1424dd7dc26b2569262edccb2429e9db91e27;hb=fbc4c23895b0ee3874d9a36401d580a2a8957ba9;hp=f1617fc923dcc496f6834d84fcbbd685a454bdcb;hpb=662b86a949f85dfcbf966a346dba8306710eabcb;p=folly.git diff --git a/folly/portability/Sockets.h b/folly/portability/Sockets.h index f1617fc9..99f1424d 100755 --- a/folly/portability/Sockets.h +++ b/folly/portability/Sockets.h @@ -25,6 +25,24 @@ #include #include #include + +#ifdef MSG_ERRQUEUE +/* for struct sock_extended_err*/ +#include +#endif + +#ifndef SO_EE_ORIGIN_ZEROCOPY +#define SO_EE_ORIGIN_ZEROCOPY 5 +#endif + +#ifndef SO_ZEROCOPY +#define SO_ZEROCOPY 60 +#endif + +#ifndef MSG_ZEROCOPY +#define MSG_ZEROCOPY 0x4000000 +#endif + #else #include #include @@ -35,6 +53,11 @@ using nfds_t = int; using sa_family_t = ADDRESS_FAMILY; +// these are not supported +#define SO_EE_ORIGIN_ZEROCOPY 0 +#define SO_ZEROCOPY 0 +#define MSG_ZEROCOPY 0x0 + // We don't actually support either of these flags // currently. #define MSG_DONTWAIT 0x1000 @@ -198,5 +221,6 @@ int setsockopt( #ifdef _WIN32 // Add our helpers to the overload set. -/* using override */ using namespace folly::portability::sockets; +/* using override */ +using namespace folly::portability::sockets; #endif