. USE_ACCEPTFILTER -> NO_ACCEPTFILTER and document it.

This commit is contained in:
Emil Mikulic 2003-11-28 05:12:43 +00:00
parent a0dddaf19a
commit a4be99dc3f
1 changed files with 5 additions and 4 deletions

View File

@ -30,9 +30,10 @@ static const char copyright[] = "copyright (c) 2003 Emil Mikulic";
static const char rcsid[] =
"$Id$";
/* Note: Solaris users: link with -lxnet */
#define USE_ACCEPTFILTER
/*
* Note: Solaris users: link with -lxnet
* Note: FreeBSD users: -DNO_ACCEPTFILTER to turn off acceptfilter
*/
#ifdef __linux
#define _GNU_SOURCE /* for strsignal() and vasprintf() */
@ -459,7 +460,7 @@ static void nonblock_socket(const int sock)
*/
static void acceptfilter_socket(const int sock)
{
#if defined(__FreeBSD__) && defined(USE_ACCEPTFILTER)
#if defined(__FreeBSD__) && !defined(NO_ACCEPTFILTER)
struct accept_filter_arg filt = {"httpready", ""};
if (setsockopt(sock, SOL_SOCKET, SO_ACCEPTFILTER,
&filt, sizeof(filt)) == -1)