*/
#include "libmemcached/common.h"
-
-#ifdef HAVE_SYS_SOCKET_H
-# include <sys/socket.h>
-#endif
+#include "p9y/poll.hpp"
void initialize_binary_request(memcached_instance_st *server,
protocol_binary_request_header &header) {
case EWOULDBLOCK:
#endif
case EAGAIN:
-#ifdef __linux
+#ifdef HAVE_ERESTART
case ERESTART:
#endif
break; // No IO is fine, we can just move on
int local_errno = get_socket_errno(); // We cache in case memcached_quit_server() modifies errno
assert_msg(active_fd == -1, "poll() returned an unexpected value");
switch (local_errno) {
-#ifdef __linux
+#ifdef ERESTART
case ERESTART:
#endif
case EINTR:
case EWOULDBLOCK:
#endif
case EAGAIN:
-#ifdef __linux
+#ifdef HAVE_ERESTART
case ERESTART:
#endif
{
case EWOULDBLOCK:
#endif
case EAGAIN:
-#ifdef __linux
+#ifdef ERESTART
case ERESTART:
#endif
if (memcached_success(io_wait(instance, POLLIN))) {