mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-09 16:47:18 +02:00
[BUILD] add the USE_GETADDRINFO build option
This one is used to call getaddrinfo() to resolve IPv6 host names.
This commit is contained in:
parent
d5f4328efd
commit
64bc40b654
8
Makefile
8
Makefile
@ -23,6 +23,7 @@
|
|||||||
# USE_LIBCRYPT : enable crypted passwords using -lcrypt
|
# USE_LIBCRYPT : enable crypted passwords using -lcrypt
|
||||||
# USE_CRYPT_H : set it if your system requires including crypt.h
|
# USE_CRYPT_H : set it if your system requires including crypt.h
|
||||||
# USE_VSYSCALL : enable vsyscall on Linux x86, bypassing libc
|
# USE_VSYSCALL : enable vsyscall on Linux x86, bypassing libc
|
||||||
|
# USE_GETADDRINFO : use getaddrinfo() to resolve IPv6 host names.
|
||||||
#
|
#
|
||||||
# Options can be forced by specifying "USE_xxx=1" or can be disabled by using
|
# Options can be forced by specifying "USE_xxx=1" or can be disabled by using
|
||||||
# "USE_xxx=" (empty string).
|
# "USE_xxx=" (empty string).
|
||||||
@ -215,12 +216,14 @@ ifeq ($(TARGET),linux26)
|
|||||||
else
|
else
|
||||||
ifeq ($(TARGET),solaris)
|
ifeq ($(TARGET),solaris)
|
||||||
# This is for Solaris 8
|
# This is for Solaris 8
|
||||||
|
# We also enable getaddrinfo() which works since solaris 8.
|
||||||
USE_POLL = implicit
|
USE_POLL = implicit
|
||||||
TARGET_CFLAGS = -fomit-frame-pointer -DFD_SETSIZE=65536 -D_REENTRANT
|
TARGET_CFLAGS = -fomit-frame-pointer -DFD_SETSIZE=65536 -D_REENTRANT
|
||||||
TARGET_LDFLAGS = -lnsl -lsocket
|
TARGET_LDFLAGS = -lnsl -lsocket
|
||||||
USE_TPROXY = implicit
|
USE_TPROXY = implicit
|
||||||
USE_LIBCRYPT = implicit
|
USE_LIBCRYPT = implicit
|
||||||
USE_CRYPT_H = implicit
|
USE_CRYPT_H = implicit
|
||||||
|
USE_GETADDRINFO = implicit
|
||||||
else
|
else
|
||||||
ifeq ($(TARGET),freebsd)
|
ifeq ($(TARGET),freebsd)
|
||||||
# This is for FreeBSD
|
# This is for FreeBSD
|
||||||
@ -354,6 +357,11 @@ OPTIONS_CFLAGS += -DNEED_CRYPT_H
|
|||||||
BUILD_OPTIONS += $(call ignore_implicit,USE_CRYPT_H)
|
BUILD_OPTIONS += $(call ignore_implicit,USE_CRYPT_H)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifneq ($(USE_GETADDRINFO),)
|
||||||
|
OPTIONS_CFLAGS += -DUSE_GETADDRINFO
|
||||||
|
BUILD_OPTIONS += $(call ignore_implicit,USE_GETADDRINFO)
|
||||||
|
endif
|
||||||
|
|
||||||
ifneq ($(USE_POLL),)
|
ifneq ($(USE_POLL),)
|
||||||
OPTIONS_CFLAGS += -DENABLE_POLL
|
OPTIONS_CFLAGS += -DENABLE_POLL
|
||||||
OPTIONS_OBJS += src/ev_poll.o
|
OPTIONS_OBJS += src/ev_poll.o
|
||||||
|
@ -77,6 +77,7 @@ OPT_OBJS =
|
|||||||
# set some defines when needed.
|
# set some defines when needed.
|
||||||
# Known ones are -DENABLE_POLL
|
# Known ones are -DENABLE_POLL
|
||||||
# - use -DTPROXY to compile with transparent proxy support.
|
# - use -DTPROXY to compile with transparent proxy support.
|
||||||
|
# - use -DUSE_GETADDRINFO to use of getaddrinfo() to resolve IPv6 host names
|
||||||
DEFINE = -DTPROXY
|
DEFINE = -DTPROXY
|
||||||
|
|
||||||
# May be changed to patch PAGE_SIZE on every platform when using dlmalloc
|
# May be changed to patch PAGE_SIZE on every platform when using dlmalloc
|
||||||
|
@ -77,6 +77,7 @@ ADDLIB =
|
|||||||
# set some defines when needed.
|
# set some defines when needed.
|
||||||
# Known ones are -DENABLE_POLL
|
# Known ones are -DENABLE_POLL
|
||||||
# - use -DTPROXY to compile with transparent proxy support.
|
# - use -DTPROXY to compile with transparent proxy support.
|
||||||
|
# - use -DUSE_GETADDRINFO to use of getaddrinfo() to resolve IPv6 host names
|
||||||
DEFINE = -DTPROXY
|
DEFINE = -DTPROXY
|
||||||
|
|
||||||
# May be changed to patch PAGE_SIZE on every platform when using dlmalloc
|
# May be changed to patch PAGE_SIZE on every platform when using dlmalloc
|
||||||
|
11
README
11
README
@ -70,6 +70,17 @@ install it on target systems. Available build options for PCRE are :
|
|||||||
Warning! group references on Solaris seem broken. Use static-pcre whenever
|
Warning! group references on Solaris seem broken. Use static-pcre whenever
|
||||||
possible.
|
possible.
|
||||||
|
|
||||||
|
Recent systems can resolve IPv6 host names using getaddrinfo(). This primitive
|
||||||
|
is not present in all libcs and does not work in all of them either. Support in
|
||||||
|
glibc was broken before 2.3. Some embedded libs may not properly work either,
|
||||||
|
thus, support is disabled by default, meaning that some host names which only
|
||||||
|
resolve as IPv6 addresses will not resolve and configs might emit an error
|
||||||
|
during parsing. If you know that your OS libc has reliable support for
|
||||||
|
getaddrinfo(), you can add USE_GETADDRINFO=1 on the make command line to enable
|
||||||
|
it. This is the recommended option for most Linux distro packagers since it's
|
||||||
|
working fine on all recent mainstream distros. It is automatically enabled on
|
||||||
|
Solaris 8 and above, as it's known to work.
|
||||||
|
|
||||||
By default, the DEBUG variable is set to '-g' to enable debug symbols. It is
|
By default, the DEBUG variable is set to '-g' to enable debug symbols. It is
|
||||||
not wise to disable it on uncommon systems, because it's often the only way to
|
not wise to disable it on uncommon systems, because it's often the only way to
|
||||||
get a complete core when you need one. Otherwise, you can set DEBUG to '-s' to
|
get a complete core when you need one. Otherwise, you can set DEBUG to '-s' to
|
||||||
|
Loading…
Reference in New Issue
Block a user