this should fix the build on platforms without pipe2(2)
Signed-off-by: Kefu Chai <kchai@redhat.com>
*/
#include "include/compat.h"
+#include <iterator>
#include <sys/socket.h>
#include <netinet/tcp.h>
#include <sys/uio.h>
#else
int ret = ::pipe(selfpipe);
if (ret == 0) {
- for (int i = 0; i < ceph::size(selfpipe); i++) {
+ for (int i = 0; i < std::size(selfpipe); i++) {
int f = fcntl(selfpipe[i], F_GETFD);
fcntl(selfpipe[i], F_SETFD, f | FD_CLOEXEC | O_NONBLOCK);
}