1 /* $Cambridge: exim/src/OS/os.h-Linux,v 1.6 2007/10/04 13:23:05 tom Exp $ */
3 /* Exim: OS-specific C header file for Linux */
6 #define GLIBC_IP_OPTIONS
8 #define HAVE_BSD_GETLOADAVG
9 #define HAVE_SYS_STATVFS_H
13 /* When using the experimental Domainkeys/DKIM extensions, setting
14 HAVE_LINUX_SENDFILE can increase performance on outgoing mail a bit.
15 Note: With older glibc versions this setting will conflict with the
16 _FILE_OFFSET_BITS=64 setting defined as part of the Linux CFLAGS. */
18 /* #define HAVE_LINUX_SENDFILE */
20 #define F_FREESP O_TRUNC
21 typedef struct flock flock_t;
23 #define os_strsignal strsignal
26 #if defined(__linux__) || defined(__FreeBSD_kernel__) || defined(__NetBSD_kernel__)
27 #define SIOCGIFCONF_GIVES_ADDR
28 #define HAVE_SYS_MOUNT_H
31 #if defined(__linux__)
33 /* Some versions of Linux need explicit sync-ing of directories as well as
34 files. This setting requests that. If the directory is on NFS, it may not
35 be possible to sync it - in that case, Exim now should ignore the error. But
36 if you have problems in that area, try undefining this. But be aware that you
37 may be in a situation where files are not being properly "committed to stable
38 storage" as quickly as Exim thinks they are. */
40 #define NEED_SYNC_DIRECTORY
42 /* Other OS have "const" in here */
43 #define ICONV_ARG2_TYPE char **
45 #define os_find_running_interfaces os_find_running_interfaces_linux
47 /* Need a prototype for the Linux-specific function. The structure hasn't
48 been defined yet, so we need to pre-declare it. */
50 struct ip_address_item;
51 extern struct ip_address_item *os_find_running_interfaces_linux(void);
53 #endif /* __linux__ */
57 /* Fudge added because this Linux doesn't appear to have a definition
58 for ip_options in /usr/include/linux/ip.h. */
60 #define ip_options options