Commit | Line | Data |
---|---|---|
61ec970d PH |
1 | /* Exim: OS-specific C header file for FreeBSD */ |
2 | ||
7d758a6a JH |
3 | #include <sys/types.h> |
4 | ||
61ec970d | 5 | #define HAVE_BSD_GETLOADAVG |
79378e0f | 6 | #define HAVE_SETCLASSRESOURCES |
61ec970d PH |
7 | #define HAVE_MMAP |
8 | #define HAVE_SYS_MOUNT_H | |
9 | #define SIOCGIFCONF_GIVES_ADDR | |
0eb8eedd NM |
10 | #define HAVE_SRANDOMDEV |
11 | #define HAVE_ARC4RANDOM | |
61ec970d PH |
12 | |
13 | typedef struct flock flock_t; | |
14 | ||
863bd541 PP |
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". | |
18 | * | |
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. | |
852e25c5 PP |
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+) | |
863bd541 PP |
26 | * |
27 | * Thus we no longer override iconv. | |
28 | * | |
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. | |
32 | */ | |
852e25c5 PP |
33 | #if __FreeBSD__ >= 10 |
34 | # define LIBICONV_PLUG | |
35 | #endif | |
36 | /* for more specific version constraints, include <sys/param.h> and look at | |
37 | * __FreeBSD_version */ | |
9c19b270 | 38 | |
7d758a6a JH |
39 | |
40 | /* When using DKIM, setting OS_SENDFILE can increase | |
41 | performance on outgoing mail a bit. */ | |
42 | ||
43 | #define OS_SENDFILE | |
44 | extern ssize_t os_sendfile(int, int, off_t *, size_t); | |
45 | ||
61ec970d | 46 | /* End */ |