Project

General

Profile

Bug #2746 ยป 0001-core-DragonFlyBSD-fixes.patch

xenu, 2016-08-15 22:09

View differences:

src/base.h
329 329
	off_t *global_bytes_per_second_cnt_ptr; /*  */
330 330

  
331 331
#if defined(__FreeBSD__) || defined(__NetBSD__) \
332
 || defined(__OpenBSD__) || defined(__DragonflyBSD__)
332
 || defined(__OpenBSD__) || defined(__DragonFly__)
333 333
	buffer *bsd_accept_filter;
334 334
#endif
335 335

  
src/configfile.c
184 184
		s->ssl_ec_curve  = buffer_init();
185 185
		s->errorfile_prefix = buffer_init();
186 186
	      #if defined(__FreeBSD__) || defined(__NetBSD__) \
187
	       || defined(__OpenBSD__) || defined(__DragonflyBSD__)
187
	       || defined(__OpenBSD__) || defined(__DragonFly__)
188 188
		s->bsd_accept_filter = (i == 0)
189 189
		  ? buffer_init()
190 190
		  : buffer_init_buffer(srv->config_storage[0]->bsd_accept_filter);
......
285 285
		cv[70].destination = &(s->listen_backlog);
286 286
		cv[71].destination = s->error_handler_404;
287 287
	      #if defined(__FreeBSD__) || defined(__NetBSD__) \
288
	       || defined(__OpenBSD__) || defined(__DragonflyBSD__)
288
	       || defined(__OpenBSD__) || defined(__DragonFly__)
289 289
		cv[75].destination = s->bsd_accept_filter;
290 290
	      #endif
291 291
		cv[76].destination = &(s->stream_request_body);
src/fdevent.c
254 254
#include <netinet/tcp.h>
255 255
#if (defined(__APPLE__) && defined(__MACH__)) \
256 256
  || defined(__FreeBSD__) || defined(__NetBSD__) \
257
  || defined(__OpenBSD__) || defined(__DragonflyBSD__)
257
  || defined(__OpenBSD__) || defined(__DragonFly__)
258 258
#include <netinet/tcp_fsm.h>
259 259
#endif
260 260

  
......
265 265
    socklen_t tlen = sizeof(tcpi);
266 266
    return (0 == getsockopt(fd, IPPROTO_TCP, TCP_CONNECTION_INFO, &tcpi, &tlen)
267 267
            && tcpi.tcpi_state == TCPS_CLOSE_WAIT);
268
  #elif defined(TCPS_CLOSE_WAIT) /* FreeBSD, NetBSD (not present in OpenBSD) */
268
  #elif defined(TCPS_CLOSE_WAIT) && defined(TCP_INFO) /* FreeBSD, NetBSD (not present in OpenBSD) */
269 269
    struct tcp_info tcpi;
270 270
    socklen_t tlen = sizeof(tcpi);
271 271
    return (0 == getsockopt(fd, IPPROTO_TCP, TCP_INFO, &tcpi, &tlen)
src/network.c
495 495
		}
496 496
#endif
497 497
#if defined(__FreeBSD__) || defined(__NetBSD__) \
498
 || defined(__OpenBSD__) || defined(__DragonflyBSD__)
498
 || defined(__OpenBSD__) || defined(__DragonFly__)
499 499
	} else if (!buffer_is_empty(s->bsd_accept_filter)
500 500
		   && (buffer_is_equal_string(s->bsd_accept_filter, CONST_STR_LEN("httpready"))
501 501
			|| buffer_is_equal_string(s->bsd_accept_filter, CONST_STR_LEN("dataready")))) {
502
- 
    (1-1/1)