X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=test%2Flib%2FForkAndExec.cpp;h=be994fc680efa82e7ed9a632f9ab969b5826b62c;hb=4d0875e07adee83952ffcd15add00b0c71c29180;hp=48a8dc18bac36621cedfd50d7ef5f1ae9ae7df66;hpb=21e20f73898b5f47e6cbd866beb95e95d6bf1215;p=m6w6%2Flibmemcached diff --git a/test/lib/ForkAndExec.cpp b/test/lib/ForkAndExec.cpp index 48a8dc18..be994fc6 100644 --- a/test/lib/ForkAndExec.cpp +++ b/test/lib/ForkAndExec.cpp @@ -1,10 +1,12 @@ #include "ForkAndExec.hpp" +#include "p9y/poll.hpp" #include - #include -#include -#include +#if HAVE_UNISTD_H +# include +#endif +#include #if !HAVE_PIPE2 static inline int setfl(int fd, int newflags) { @@ -107,7 +109,7 @@ void ForkAndExec::closePipe(int &fd) { } void ForkAndExec::pollExecReadyPipe() { -#if __APPLE__ || __FreeBSD__ +#if __APPLE__ char c, n = 50; do { if (0 == read(ready[mode::READ], &c, 1)) {