3 * Copyright (C) Igor Sysoev
4 * Copyright (C) Nginx, Inc.
8 #ifndef _NGX_FREEBSD_CONFIG_H_INCLUDED_
9 #define _NGX_FREEBSD_CONFIG_H_INCLUDED_
12 #include <sys/types.h>
16 #include <stddef.h> /* offsetof() */
27 #include <sys/param.h> /* ALIGN() */
28 #include <sys/mount.h> /* statfs() */
30 #include <sys/filio.h> /* FIONBIO */
37 #include <sys/resource.h>
40 #include <sys/socket.h>
41 #include <netinet/in.h>
42 #include <netinet/tcp.h> /* TCP_NODELAY, TCP_NOPUSH */
43 #include <arpa/inet.h>
47 #include <libutil.h> /* setproctitle() before 4.1 */
48 #include <osreldate.h>
49 #include <sys/sysctl.h>
52 #if __FreeBSD_version < 400017
55 * FreeBSD 3.x has no CMSG_SPACE() and CMSG_LEN() and has the broken CMSG_DATA()
59 #define CMSG_SPACE(l) (ALIGN(sizeof(struct cmsghdr)) + ALIGN(l))
62 #define CMSG_LEN(l) (ALIGN(sizeof(struct cmsghdr)) + (l))
65 #define CMSG_DATA(cmsg) ((u_char *)(cmsg) + ALIGN(sizeof(struct cmsghdr)))
70 #include <ngx_auto_config.h>
73 #if (NGX_HAVE_POSIX_SEM)
74 #include <semaphore.h>
84 #include <sys/event.h>
88 #if (NGX_HAVE_FILE_AIO || NGX_HAVE_AIO)
90 typedef struct aiocb ngx_aiocb_t
;
94 #define NGX_LISTEN_BACKLOG -1
97 #if (__FreeBSD_version < 430000 || __FreeBSD_version < 500012)
99 pid_t
rfork_thread(int flags
, void *stack
, int (*func
)(void *arg
), void *arg
);
108 #ifndef NGX_HAVE_INHERITED_NONBLOCK
109 #define NGX_HAVE_INHERITED_NONBLOCK 1
113 #define NGX_HAVE_OS_SPECIFIC_INIT 1
114 #define NGX_HAVE_DEBUG_MALLOC 1
117 extern char **environ
;
118 extern char *malloc_options
;
121 #endif /* _NGX_FREEBSD_CONFIG_H_INCLUDED_ */