Fix some bugs when testing opensds ansible
[stor4nfv.git] / src / ceph / src / include / sock_compat.h
1 #ifndef CEPH_SOCK_COMPAT_H
2 #define CEPH_SOCK_COMPAT_H
3
4 #include "include/compat.h"
5
6 /*
7  * This optimization may not be available on all platforms (e.g. OSX).
8  * Apparently a similar approach based on TCP_CORK can be used.
9  */
10 #ifndef MSG_MORE
11 # define MSG_MORE 0
12 #endif
13
14 /*
15  * On BSD SO_NOSIGPIPE can be set via setsockopt to block SIGPIPE.
16  */
17 #ifndef MSG_NOSIGNAL
18 # define MSG_NOSIGNAL 0
19 # ifdef SO_NOSIGPIPE
20 #  define CEPH_USE_SO_NOSIGPIPE
21 # else
22 #  define CEPH_USE_SIGPIPE_BLOCKER
23 #  warning "Using SIGPIPE blocking instead of suppression; this is not well-tested upstream!"
24 # endif
25 #endif
26
27 #endif