mirror of
https://github.com/emikulic/darkhttpd.git
synced 2023-08-10 21:13:08 +03:00
. USE_ACCEPTFILTER -> NO_ACCEPTFILTER and document it.
This commit is contained in:
parent
a0dddaf19a
commit
a4be99dc3f
@ -30,9 +30,10 @@ static const char copyright[] = "copyright (c) 2003 Emil Mikulic";
|
|||||||
static const char rcsid[] =
|
static const char rcsid[] =
|
||||||
"$Id$";
|
"$Id$";
|
||||||
|
|
||||||
/* Note: Solaris users: link with -lxnet */
|
/*
|
||||||
|
* Note: Solaris users: link with -lxnet
|
||||||
#define USE_ACCEPTFILTER
|
* Note: FreeBSD users: -DNO_ACCEPTFILTER to turn off acceptfilter
|
||||||
|
*/
|
||||||
|
|
||||||
#ifdef __linux
|
#ifdef __linux
|
||||||
#define _GNU_SOURCE /* for strsignal() and vasprintf() */
|
#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)
|
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", ""};
|
struct accept_filter_arg filt = {"httpready", ""};
|
||||||
if (setsockopt(sock, SOL_SOCKET, SO_ACCEPTFILTER,
|
if (setsockopt(sock, SOL_SOCKET, SO_ACCEPTFILTER,
|
||||||
&filt, sizeof(filt)) == -1)
|
&filt, sizeof(filt)) == -1)
|
||||||
|
Loading…
Reference in New Issue
Block a user