X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=clients%2Fms_conn.c;h=2a65f6cfa423cf83951fba2c8e20db67789243ab;hb=15d1646b2048caffbfaf2b7562665d38afe92688;hp=755a2e5a8a5db672a747479d88e6b0f21e6bb2d7;hpb=723bc354ac52038b4272677e2b621f6dfba4e55e;p=awesomized%2Flibmemcached diff --git a/clients/ms_conn.c b/clients/ms_conn.c index 755a2e5a..2a65f6cf 100644 --- a/clients/ms_conn.c +++ b/clients/ms_conn.c @@ -20,16 +20,15 @@ #include #include #include -#if TIME_WITH_SYS_TIME + +#if defined(HAVE_SYS_TIME_H) # include +#endif + +#if defined(HAVE_TIME_H) # include -#else -# if HAVE_SYS_TIME_H -# include -# else -# include -# endif #endif + #include "ms_setting.h" #include "ms_thread.h" #include "ms_atomic.h" @@ -358,7 +357,7 @@ static int ms_conn_init(ms_conn_t *c, c->mlget_task.mlget_num= 0; c->mlget_task.value_index= -1; /* default invalid value */ - if (ms_setting.binary_prot) + if (ms_setting.binary_prot_) { c->protocol= binary_prot; } @@ -2125,6 +2124,7 @@ static int ms_add_iov(ms_conn_t *c, const void *buf, int len) */ limit_to_mtu= c->udp; +#ifdef IOV_MAX /* We may need to start a new msghdr if this one is full. */ if ((m->msg_iovlen == IOV_MAX) || (limit_to_mtu && (c->msgbytes >= UDP_MAX_SEND_PAYLOAD_SIZE))) @@ -2132,6 +2132,7 @@ static int ms_add_iov(ms_conn_t *c, const void *buf, int len) ms_add_msghdr(c); m= &c->msglist[c->msgused - 1]; } +#endif if (ms_ensure_iov_space(c) != 0) return -1;