1 /* Exim: OS-specific C header file for FreeBSD */
5 #define HAVE_BSD_GETLOADAVG
6 #define HAVE_SETCLASSRESOURCES
8 #define HAVE_SYS_MOUNT_H
9 #define SIOCGIFCONF_GIVES_ADDR
10 #define HAVE_SRANDOMDEV
11 #define HAVE_ARC4RANDOM
13 typedef struct flock flock_t;
15 /* iconv arg2 type: libiconv in Ports uses "const char* * inbuf" and was
16 * traditionally the only approach available. The iconv functionality
17 * in libc is "char ** restrict src".
19 * <https://www.freebsd.org/doc/en/books/porters-handbook/using-iconv.html>
20 * says that libc has iconv since 2013, in 10-CURRENT. FreeBSD man-pages
21 * shows it included in 10.0-RELEASE. Writing this in 2017, 10.3 is the
22 * oldest supported release, so we should assume non-libiconv by default.
23 * (Actually, people still using old releases past EOL; we shouldn't support
24 * them but I don't want to deal with howls of complaints because we dare
25 * to not support the unsupported, so guard this on FreeBSD 10+)
27 * Thus we no longer override iconv.
29 * However, if libiconv is installed, and anything adds /usr/local/include
30 * to include-path (likely) then we'll get that. So define a variable
31 * which makes the libiconv try to not interfere with OS iconv.
34 # define LIBICONV_PLUG
36 /* for more specific version constraints, include <sys/param.h> and look at
37 * __FreeBSD_version */
40 /* When using DKIM, setting OS_SENDFILE can increase
41 performance on outgoing mail a bit. */
44 extern ssize_t os_sendfile(int, int, off_t *, size_t);
49 /* TCP_FASTOPEN support. There does not seems to be a
50 MSG_FASTOPEN defined yet... */
52 #include <netinet/tcp.h> /* for TCP_FASTOPEN */
53 #include <sys/socket.h> /* for MSG_FASTOPEN */
54 #if defined(TCP_FASTOPEN) && !defined(MSG_FASTOPEN)
55 # define MSG_FASTOPEN 0x20000000
58 /* for TCP state-variable values, for TFO logging */
59 #include <netinet/tcp_fsm.h>
60 #define TCP_SYN_RECV TCPS_SYN_RECEIVED