Merge branch '3974-rpz-testlib-test-data-c-compilation-fails-on-openbsd' into 'main'

Resolve "rpz/testlib/test-data.c compilation fails on OpenBSD"

Closes #3974

See merge request isc-projects/bind9!7748
This commit is contained in:
Ondřej Surý 2023-04-03 13:32:32 +00:00
commit 94e42daa0f
4 changed files with 22 additions and 2 deletions

View file

@ -66,7 +66,7 @@ rpz_dnsrps_CPPFLAGS = \
rpz_dnsrps_LDADD = \
$(LDADD) \
$(LIBDNS_LIBS) \
-ldl
$(DLOPEN_LIBS)
TESTS =

View file

@ -9,4 +9,4 @@ AM_CFLAGS += -Wall -pedantic
check_LTLIBRARIES = libdummyrpz.la
libdummyrpz_la_SOURCES= dummylib.c test-data.c trpz.h test-data.h
libdummyrpz_la_LDFLAGS = -avoid-version -module -shared -export-dynamic -rpath $(abs_builddir)
LDADD += -lpthread -ldl
LDADD += -lpthread $(DLOPEN_LIBS)

View file

@ -31,6 +31,22 @@
#define LIBRPZ_LIB_OPEN 2
#include <dns/librpz.h>
#if __NAMESER < 19991006
/*
* If the new API is not available define the values we use.
*/
#define ns_c_in 1
#define ns_t_invalid 0
#define ns_t_a 1
#define ns_t_cname 5
#define ns_t_txt 16
#define ns_t_aaaa 28
#define ns_t_dname 39
#endif
#include "trpz.h"
#define NODE_FLAG_IPV6_ADDRESS 0x1

View file

@ -108,9 +108,13 @@ AC_PROG_MKDIR_P
# Initialize libtool
LT_INIT([disable-static dlopen pic-only])
DLOPEN_LIBS="$lt_cv_dlopen_libs"
AC_SUBST(DLOPEN_LIBS)
AS_IF([test "$enable_static" != "no" && test "$enable_developer" != "yes"],
[AC_MSG_ERROR([Static linking is not supported as it disables dlopen() and certain security features (e.g. RELRO, ASLR)])])
#
# Set the default CFLAGS, CPPFLAGS, and LDFLAGS
#