From 2687778cf7c099e47de410d62d26d874f4dcebba Mon Sep 17 00:00:00 2001 From: Franklin Wei Date: Mon, 28 Mar 2016 14:11:22 -0400 Subject: kludge things to compile on old linux --- src/server.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/server.c') diff --git a/src/server.c b/src/server.c index e42483c..f0b56ec 100644 --- a/src/server.c +++ b/src/server.c @@ -21,6 +21,7 @@ #include "client.h" #include "hash.h" #include "server.h" +#include "server_reqs.h" #include "userdb.h" #include "util.h" #include "world.h" @@ -254,9 +255,9 @@ static void new_connection_cb(EV_P_ ev_io *w, int revents) int readpipe[2]; /* child->parent */ int outpipe [2]; /* parent->child */ - if(pipe2(readpipe, O_DIRECT) < 0) + if(pipe(readpipe) < 0) error("error creating pipe, need linux kernel >= 3.4"); - if(pipe2(outpipe, O_DIRECT) < 0) + if(pipe(outpipe) < 0) error("error creating pipe, need linux kernel >= 3.4"); pid_t pid = fork(); -- cgit v1.1