mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-25 07:41:36 +02:00
BUG/MEDIUM: compat: fix segfault on FreeBSD
Since commit 65d805fd witch removes standard.h from compat.h some values were not properly set on FreeBSD. This caused a segfault at startup when smp_resolve_args is called. As FreeBSD have IP_BINDANY, CONFIG_HAP_TRANSPARENT is define. This cause struct conn_src to be extended with some fields. The size of this structure was incorrect. Including netinet/in.h fix this issue. While diving in code preprocessing, I found that limits.h was require to properly set MAX_HOSTNAME_LEN, ULONG_MAX, USHRT_MAX and others system limits on FreeBSD.
This commit is contained in:
parent
3054880e09
commit
9dd44ba5d6
@ -22,11 +22,13 @@
|
|||||||
#ifndef _COMMON_COMPAT_H
|
#ifndef _COMMON_COMPAT_H
|
||||||
#define _COMMON_COMPAT_H
|
#define _COMMON_COMPAT_H
|
||||||
|
|
||||||
|
#include <limits.h>
|
||||||
/* This is needed on Linux for Netfilter includes */
|
/* This is needed on Linux for Netfilter includes */
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
|
#include <netinet/in.h>
|
||||||
|
|
||||||
#ifndef BITS_PER_INT
|
#ifndef BITS_PER_INT
|
||||||
#define BITS_PER_INT (8*sizeof(int))
|
#define BITS_PER_INT (8*sizeof(int))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user