blob: a605da1ec4d9a6c420834c0f186e07fbc3fdc961 [file] [log] [blame]
Willy Tarreaubaaee002006-06-26 02:48:02 +02001/*
Willy Tarreau2dd0d472006-06-29 17:53:05 +02002 include/common/compat.h
Willy Tarreaubaaee002006-06-26 02:48:02 +02003 Operating system compatibility interface.
4
5 Copyright (C) 2000-2006 Willy Tarreau - w@1wt.eu
6
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Lesser General Public
9 License as published by the Free Software Foundation, version 2.1
10 exclusively.
11
12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Lesser General Public License for more details.
16
17 You should have received a copy of the GNU Lesser General Public
18 License along with this library; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20*/
21
Willy Tarreau2dd0d472006-06-29 17:53:05 +020022#ifndef _COMMON_COMPAT_H
23#define _COMMON_COMPAT_H
Willy Tarreaubaaee002006-06-26 02:48:02 +020024
25/* This is needed on Linux for Netfilter includes */
26#include <sys/socket.h>
27
28/* INTBITS
29 * how many bits are needed to code the size of an int on the target platform.
30 * (eg: 32bits -> 5)
31 */
32#define INTBITS 5
33
34/* this is for libc5 for example */
35#ifndef TCP_NODELAY
36#define TCP_NODELAY 1
37#endif
38
39#ifndef SHUT_RD
40#define SHUT_RD 0
41#endif
42
43#ifndef SHUT_WR
44#define SHUT_WR 1
45#endif
46
47#if defined(TPROXY) && defined(NETFILTER)
48#include <linux/netfilter_ipv4.h>
49#endif
50
51#if defined(__dietlibc__)
52#include <strings.h>
53#endif
54
Willy Tarreau2dd0d472006-06-29 17:53:05 +020055#endif /* _COMMON_COMPAT_H */
Willy Tarreaubaaee002006-06-26 02:48:02 +020056
57/*
58 * Local variables:
59 * c-indent-level: 8
60 * c-basic-offset: 8
61 * End:
62 */