Commit 85f1e407 authored by Artur Bergman's avatar Artur Bergman

revert merge r4162

git-svn-id: http://www.varnish-cache.org/svn/branches/2.0@4164 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent a94874ee
......@@ -56,11 +56,6 @@
#include "libvarnish.h"
/* Solaris can't use the ioctl" */
#ifdef __sun
#include <fcntl.h>
#endif
/*--------------------------------------------------------------------*/
void
......@@ -131,9 +126,6 @@ TCP_filter_http(int sock)
* us to do two syscalls, one to get and one to set, the latter of
* which mucks about a bit before it ends up calling ioctl(FIONBIO),
* at least on FreeBSD.
*
* On some platforms we need to use fcntl because the ioctl is unreliable
* The one that we know this is the case for is solaris.
*/
void
......@@ -141,13 +133,8 @@ TCP_blocking(int sock)
{
int i;
#ifdef __sun
i = fcntl (sock, F_GETFL,0);
fcntl(sock, F_SETFL, i & ~O_NONBLOCK);
#else
i = 0;
AZ(ioctl(sock, FIONBIO, &i));
#endif
}
void
......@@ -155,13 +142,8 @@ TCP_nonblocking(int sock)
{
int i;
#ifdef __sun
i = fcntl (sock, F_GETFL,0);
fcntl(sock, F_SETFL, i | O_NONBLOCK);
#else
i = 1;
AZ(ioctl(sock, FIONBIO, &i));
#endif
}
/*--------------------------------------------------------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment