X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=lib%2Fsilcutil%2Funix%2Fsilcunixutil.c;h=15356c52b92b474f40b0f5e01c27a709920ad948;hb=40f8443d8d3a6577336ee66d18e04d9ac4d956bb;hp=300beff0b391571d13d637c87de9ec13d3c46a9b;hpb=0f0340b9fbce9704cc7171f8f0104ce9103d2de6;p=silc.git diff --git a/lib/silcutil/unix/silcunixutil.c b/lib/silcutil/unix/silcunixutil.c index 300beff0..15356c52 100644 --- a/lib/silcutil/unix/silcunixutil.c +++ b/lib/silcutil/unix/silcunixutil.c @@ -22,7 +22,7 @@ */ /* $Id$ */ -#include "silcincludes.h" +#include "silc.h" /* XXX lib/contrib/regex.c might cmopile on WIN32 as well */ @@ -176,3 +176,9 @@ int silc_gettimeofday(struct timeval *p) { return gettimeofday(p, NULL); } + +int silc_file_set_nonblock(int fd) +{ + return fcntl(fd, F_SETFL, fcntl(fd, F_GETFL, 0) | O_NONBLOCK); +} +