From: Jann Horn Date: Thu, 14 Nov 2013 11:19:02 +0000 (+0100) Subject: net.c: remove stdio for network stuff for now because rw stdio streams don't work... X-Git-Url: http://git.thejh.net/?p=libjh.git;a=commitdiff_plain;h=e441982fc2b9881df7670340e4189709b554b25b;ds=sidebyside net.c: remove stdio for network stuff for now because rw stdio streams don't work with non-seekable fds --- diff --git a/net.c b/net.c index 8d67e71..d9b2d43 100644 --- a/net.c +++ b/net.c @@ -39,21 +39,3 @@ err_socket: freeaddrinfo(addrs); return EAI_SYSTEM; } - -// err points to where the error from netopen() should be stored -PUBLIC_FN FILE *fnetopen(const char *node, const char *service, const struct addrinfo *hints, int *err) { - int rval = netopen(node, service, hints); - if (rval < 0) goto err; - - FILE *res = fdopen(rval, "r+"); - if (res) return res; - - int errno_ = errno; - close(rval); - errno = errno_; - rval = EAI_SYSTEM; - -err: - if (err) *err = rval; - return NULL; -} \ No newline at end of file