1 /* config.h. Generated from config.h.in by configure. */
2 /* config.h.in. Generated from configure.ac by autoheader. */
5 /* apply the noreturn attribute to a function that exits the program */
6 #define ATTR_NORETURN __attribute__((__noreturn__))
8 /* apply the weak attribute to a symbol */
9 #define ATTR_WEAK __attribute__((weak))
11 /* Directory to chroot to */
12 #define CHROOT_DIR "/var/unbound"
14 /* Define this to enable client subnet option. */
15 /* #undef CLIENT_SUBNET */
17 /* Do sha512 definitions in config.h */
18 /* #undef COMPAT_SHA512 */
20 /* Command line arguments used with configure */
21 #define CONFCMDLINE "--with-ssl=/usr --with-libexpat=/usr --disable-dnscrypt --disable-dnstap --enable-ecdsa --disable-event-api --enable-gost --with-libevent --disable-subnet --disable-tfo-client --disable-tfo-server --with-pthreads--prefix=/usr --localstatedir=/var/unbound --mandir=/usr/share/man --build=freebsd"
23 /* Pathname to the Unbound configuration file */
24 #define CONFIGFILE "/var/unbound/unbound.conf"
26 /* Define this if on macOSX10.4-darwin8 and setreuid and setregid do not work
28 /* #undef DARWIN_BROKEN_SETREUID */
30 /* Whether daemon is deprecated */
31 /* #undef DEPRECATED_DAEMON */
33 /* Deprecate RSA 1024 bit length, makes that an unsupported key */
34 /* #undef DEPRECATE_RSA_1024 */
36 /* Deprecate RSA 1024 bit length, makes that an unsupported key */
37 /* #undef DEPRECATE_RSA_1024 */
39 /* Define this to enable kernel based UDP source port randomization. */
40 /* #undef DISABLE_EXPLICIT_PORT_RANDOMISATION */
42 /* default dnstap socket path */
43 /* #undef DNSTAP_SOCKET_PATH */
45 /* Define if you want to use debug lock checking (slow). */
46 /* #undef ENABLE_LOCK_CHECKS */
48 /* Define this if you enabled-allsymbols from libunbound to link binaries to
49 it for smaller install size, but the libunbound export table is polluted by
51 /* #undef EXPORT_ALL_SYMBOLS */
53 /* Define to 1 if you have the `accept4' function. */
54 #define HAVE_ACCEPT4 1
56 /* Define to 1 if you have the `arc4random' function. */
57 #define HAVE_ARC4RANDOM 1
59 /* Define to 1 if you have the `arc4random_uniform' function. */
60 #define HAVE_ARC4RANDOM_UNIFORM 1
62 /* Define to 1 if you have the <arpa/inet.h> header file. */
63 #define HAVE_ARPA_INET_H 1
65 /* Whether the C compiler accepts the "format" attribute */
66 #define HAVE_ATTR_FORMAT 1
68 /* Whether the C compiler accepts the "noreturn" attribute */
69 #define HAVE_ATTR_NORETURN 1
71 /* Whether the C compiler accepts the "unused" attribute */
72 #define HAVE_ATTR_UNUSED 1
74 /* Whether the C compiler accepts the "weak" attribute */
75 #define HAVE_ATTR_WEAK 1
77 /* If we have be64toh */
78 /* #undef HAVE_BE64TOH */
80 /* Define to 1 if you have the `BIO_set_callback_ex' function. */
81 /* #undef HAVE_BIO_SET_CALLBACK_EX */
83 /* Define to 1 if you have the `BIO_set_callback_ex' function. */
84 /* #undef HAVE_BIO_SET_CALLBACK_EX */
86 /* Define to 1 if you have the <bsd/stdlib.h> header file. */
87 /* #undef HAVE_BSD_STDLIB_H */
89 /* Define to 1 if you have the <bsd/string.h> header file. */
90 /* #undef HAVE_BSD_STRING_H */
92 /* Define to 1 if you have the `chown' function. */
95 /* Define to 1 if you have the `chroot' function. */
98 /* Define to 1 if you have the `CRYPTO_cleanup_all_ex_data' function. */
99 /* #undef HAVE_CRYPTO_CLEANUP_ALL_EX_DATA */
101 /* Define to 1 if you have the `CRYPTO_THREADID_set_callback' function. */
102 /* #undef HAVE_CRYPTO_THREADID_SET_CALLBACK */
104 /* Define to 1 if you have the `ctime_r' function. */
105 #define HAVE_CTIME_R 1
107 /* Define to 1 if you have the `daemon' function. */
108 #define HAVE_DAEMON 1
110 /* Define to 1 if you have the declaration of `arc4random', and to 0 if you
112 /* #undef HAVE_DECL_ARC4RANDOM */
114 /* Define to 1 if you have the declaration of `arc4random_uniform', and to 0
116 /* #undef HAVE_DECL_ARC4RANDOM_UNIFORM */
118 /* Define to 1 if you have the declaration of `evsignal_assign', and to 0 if
120 /* #undef HAVE_DECL_EVSIGNAL_ASSIGN */
122 /* Define to 1 if you have the declaration of `inet_ntop', and to 0 if you
124 #define HAVE_DECL_INET_NTOP 1
126 /* Define to 1 if you have the declaration of `inet_pton', and to 0 if you
128 #define HAVE_DECL_INET_PTON 1
130 /* Define to 1 if you have the declaration of `nghttp2_session_server_new',
131 and to 0 if you don't. */
132 /* #undef HAVE_DECL_NGHTTP2_SESSION_SERVER_NEW */
134 /* Define to 1 if you have the declaration of `NID_ED25519', and to 0 if you
136 #define HAVE_DECL_NID_ED25519 1
138 /* Define to 1 if you have the declaration of `NID_ED448', and to 0 if you
140 #define HAVE_DECL_NID_ED448 1
142 /* Define to 1 if you have the declaration of `NID_secp384r1', and to 0 if you
144 #define HAVE_DECL_NID_SECP384R1 1
146 /* Define to 1 if you have the declaration of `NID_X9_62_prime256v1', and to 0
148 #define HAVE_DECL_NID_X9_62_PRIME256V1 1
150 /* Define to 1 if you have the declaration of `reallocarray', and to 0 if you
152 #define HAVE_DECL_REALLOCARRAY 1
154 /* Define to 1 if you have the declaration of `redisConnect', and to 0 if you
156 /* #undef HAVE_DECL_REDISCONNECT */
158 /* Define to 1 if you have the declaration of `sk_SSL_COMP_pop_free', and to 0
160 #define HAVE_DECL_SK_SSL_COMP_POP_FREE 1
162 /* Define to 1 if you have the declaration of
163 `SSL_COMP_get_compression_methods', and to 0 if you don't. */
164 #define HAVE_DECL_SSL_COMP_GET_COMPRESSION_METHODS 1
166 /* Define to 1 if you have the declaration of `SSL_CTX_set_ecdh_auto', and to
168 #define HAVE_DECL_SSL_CTX_SET_ECDH_AUTO 1
170 /* Define to 1 if you have the declaration of `strlcat', and to 0 if you
172 /* #undef HAVE_DECL_STRLCAT */
174 /* Define to 1 if you have the declaration of `strlcpy', and to 0 if you
176 /* #undef HAVE_DECL_STRLCPY */
178 /* Define to 1 if you have the declaration of `XML_StopParser', and to 0 if
180 #define HAVE_DECL_XML_STOPPARSER 1
182 /* Define to 1 if you have the <dlfcn.h> header file. */
183 #define HAVE_DLFCN_H 1
185 /* Define to 1 if you have the `DSA_SIG_set0' function. */
186 #define HAVE_DSA_SIG_SET0 1
188 /* Define to 1 if you have the <endian.h> header file. */
189 /* #undef HAVE_ENDIAN_H */
191 /* Define to 1 if you have the `endprotoent' function. */
192 #define HAVE_ENDPROTOENT 1
194 /* Define to 1 if you have the `endpwent' function. */
195 #define HAVE_ENDPWENT 1
197 /* Define to 1 if you have the `endservent' function. */
198 #define HAVE_ENDSERVENT 1
200 /* Define to 1 if you have the `ENGINE_cleanup' function. */
201 /* #undef HAVE_ENGINE_CLEANUP */
203 /* Define to 1 if you have the `ERR_free_strings' function. */
204 /* #undef HAVE_ERR_FREE_STRINGS */
206 /* Define to 1 if you have the `ERR_load_crypto_strings' function. */
207 /* #undef HAVE_ERR_LOAD_CRYPTO_STRINGS */
209 /* Define to 1 if you have the `event_assign' function. */
210 /* #undef HAVE_EVENT_ASSIGN */
212 /* Define to 1 if you have the `event_base_free' function. */
213 /* #undef HAVE_EVENT_BASE_FREE */
215 /* Define to 1 if you have the `event_base_get_method' function. */
216 /* #undef HAVE_EVENT_BASE_GET_METHOD */
218 /* Define to 1 if you have the `event_base_new' function. */
219 /* #undef HAVE_EVENT_BASE_NEW */
221 /* Define to 1 if you have the `event_base_once' function. */
222 /* #undef HAVE_EVENT_BASE_ONCE */
224 /* Define to 1 if you have the <event.h> header file. */
225 /* #undef HAVE_EVENT_H */
227 /* Define to 1 if you have the `EVP_aes_256_cbc' function. */
228 #define HAVE_EVP_AES_256_CBC 1
230 /* Define to 1 if you have the `EVP_cleanup' function. */
231 /* #undef HAVE_EVP_CLEANUP */
233 /* Define to 1 if you have the `EVP_default_properties_is_fips_enabled'
235 /* #undef HAVE_EVP_DEFAULT_PROPERTIES_IS_FIPS_ENABLED */
238 /* Define to 1 if you have the `EVP_default_properties_is_fips_enabled'
240 /* #undef HAVE_EVP_DEFAULT_PROPERTIES_IS_FIPS_ENABLED */
242 /* Define to 1 if you have the `EVP_DigestVerify' function. */
243 #define HAVE_EVP_DIGESTVERIFY 1
245 /* Define to 1 if you have the `EVP_dss1' function. */
246 /* #undef HAVE_EVP_DSS1 */
248 /* Define to 1 if you have the `EVP_EncryptInit_ex' function. */
249 #define HAVE_EVP_ENCRYPTINIT_EX 1
251 /* Define to 1 if you have the `EVP_MAC_CTX_set_params' function. */
252 /* #undef HAVE_EVP_MAC_CTX_SET_PARAMS */
254 /* Define to 1 if you have the `EVP_MD_CTX_new' function. */
255 #define HAVE_EVP_MD_CTX_NEW 1
257 /* Define to 1 if you have the `EVP_sha1' function. */
258 #define HAVE_EVP_SHA1 1
260 /* Define to 1 if you have the `EVP_sha256' function. */
261 #define HAVE_EVP_SHA256 1
263 /* Define to 1 if you have the `EVP_sha512' function. */
264 #define HAVE_EVP_SHA512 1
266 /* Define to 1 if you have the `ev_default_loop' function. */
267 /* #undef HAVE_EV_DEFAULT_LOOP */
269 /* Define to 1 if you have the `ev_loop' function. */
270 /* #undef HAVE_EV_LOOP */
272 /* Define to 1 if you have the <expat.h> header file. */
273 #define HAVE_EXPAT_H 1
275 /* Define to 1 if you have the `explicit_bzero' function. */
276 #define HAVE_EXPLICIT_BZERO 1
278 /* Define to 1 if you have the `fcntl' function. */
281 /* Define to 1 if you have the `FIPS_mode' function. */
282 #define HAVE_FIPS_MODE 1
284 /* Define to 1 if you have the `fork' function. */
287 /* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
288 #define HAVE_FSEEKO 1
290 /* Define to 1 if you have the `fsync' function. */
293 /* Whether getaddrinfo is available */
294 #define HAVE_GETADDRINFO 1
296 /* Define to 1 if you have the `getauxval' function. */
297 /* #undef HAVE_GETAUXVAL */
299 /* Define to 1 if you have the `getentropy' function. */
300 /* #undef HAVE_GETENTROPY */
302 /* Define to 1 if you have the `getifaddrs' function. */
303 #define HAVE_GETIFADDRS 1
305 /* Define to 1 if you have the <getopt.h> header file. */
306 #define HAVE_GETOPT_H 1
308 /* Define to 1 if you have the `getpwnam' function. */
309 #define HAVE_GETPWNAM 1
311 /* Define to 1 if you have the `getrlimit' function. */
312 #define HAVE_GETRLIMIT 1
314 /* Define to 1 if you have the `gettid' function. */
315 /* #undef HAVE_GETTID */
317 /* Define to 1 if you have the `gettid' function. */
318 /* #undef HAVE_GETTID */
320 /* Define to 1 if you have the `glob' function. */
323 /* Define to 1 if you have the <glob.h> header file. */
324 #define HAVE_GLOB_H 1
326 /* Define to 1 if you have the `gmtime_r' function. */
327 #define HAVE_GMTIME_R 1
329 /* Define to 1 if you have the <grp.h> header file. */
332 /* Define to 1 if you have the <hiredis/hiredis.h> header file. */
333 /* #undef HAVE_HIREDIS_HIREDIS_H */
335 /* Define to 1 if you have the `HMAC_Init_ex' function. */
336 #define HAVE_HMAC_INIT_EX 1
338 /* If we have htobe64 */
339 /* #undef HAVE_HTOBE64 */
341 /* Define to 1 if you have the <ifaddrs.h> header file. */
342 #define HAVE_IFADDRS_H 1
344 /* Define to 1 if you have the `if_nametoindex' function. */
345 #define HAVE_IF_NAMETOINDEX 1
347 /* Define to 1 if you have the `if_nametoindex' function. */
348 #define HAVE_IF_NAMETOINDEX 1
350 /* Define to 1 if you have the `inet_aton' function. */
351 #define HAVE_INET_ATON 1
353 /* Define to 1 if you have the `inet_ntop' function. */
354 #define HAVE_INET_NTOP 1
356 /* Define to 1 if you have the `inet_pton' function. */
357 #define HAVE_INET_PTON 1
359 /* Define to 1 if you have the `initgroups' function. */
360 #define HAVE_INITGROUPS 1
362 /* Define to 1 if you have the <inttypes.h> header file. */
363 #define HAVE_INTTYPES_H 1
365 /* if the function 'ioctlsocket' is available */
366 /* #undef HAVE_IOCTLSOCKET */
368 /* Define to 1 if you have the <iphlpapi.h> header file. */
369 /* #undef HAVE_IPHLPAPI_H */
371 /* Define to 1 if you have the `isblank' function. */
372 #define HAVE_ISBLANK 1
374 /* Define to 1 if you have the `kill' function. */
377 /* Use portable libbsd functions */
378 /* #undef HAVE_LIBBSD */
380 /* Define to 1 if you have the <libkern/OSByteOrder.h> header file. */
381 /* #undef HAVE_LIBKERN_OSBYTEORDER_H */
383 /* Define if we have LibreSSL */
384 /* #undef HAVE_LIBRESSL */
386 /* Define to 1 if you have the `localtime_r' function. */
387 #define HAVE_LOCALTIME_R 1
389 /* Define to 1 if you have the <login_cap.h> header file. */
390 #define HAVE_LOGIN_CAP_H 1
392 /* If have GNU libc compatible malloc */
393 #define HAVE_MALLOC 1
395 /* Define to 1 if you have the `memmove' function. */
396 #define HAVE_MEMMOVE 1
398 /* Define to 1 if you have the <minix/config.h> header file. */
399 /* #undef HAVE_MINIX_CONFIG_H */
401 /* Define to 1 if you have the <netdb.h> header file. */
402 #define HAVE_NETDB_H 1
404 /* Define to 1 if you have the <netinet/in.h> header file. */
405 #define HAVE_NETINET_IN_H 1
407 /* Define to 1 if you have the <netinet/tcp.h> header file. */
408 #define HAVE_NETINET_TCP_H 1
410 /* Define to 1 if you have the <netioapi.h> header file. */
411 /* #undef HAVE_NETIOAPI_H */
413 /* Use libnettle for crypto */
414 /* #undef HAVE_NETTLE */
416 /* Define to 1 if you have the <nettle/dsa-compat.h> header file. */
417 /* #undef HAVE_NETTLE_DSA_COMPAT_H */
419 /* Define to 1 if you have the <nettle/eddsa.h> header file. */
420 /* #undef HAVE_NETTLE_EDDSA_H */
422 /* Define to 1 if you have the <net/if.h> header file. */
423 #define HAVE_NET_IF_H 1
425 /* Define this to use nghttp2 client. */
426 /* #undef HAVE_NGHTTP2 */
428 /* Define to 1 if you have the <nghttp2/nghttp2.h> header file. */
429 /* #undef HAVE_NGHTTP2_NGHTTP2_H */
431 /* Use libnss for crypto */
432 /* #undef HAVE_NSS */
434 /* Define to 1 if you have the `OpenSSL_add_all_digests' function. */
435 /* #undef HAVE_OPENSSL_ADD_ALL_DIGESTS */
437 /* Define to 1 if you have the <openssl/bn.h> header file. */
438 #define HAVE_OPENSSL_BN_H 1
440 /* Define to 1 if you have the `OPENSSL_config' function. */
441 #define HAVE_OPENSSL_CONFIG 1
443 /* Define to 1 if you have the <openssl/conf.h> header file. */
444 #define HAVE_OPENSSL_CONF_H 1
446 /* Define to 1 if you have the <openssl/core_names.h> header file. */
447 /* #undef HAVE_OPENSSL_CORE_NAMES_H */
449 /* Define to 1 if you have the <openssl/dh.h> header file. */
450 #define HAVE_OPENSSL_DH_H 1
452 /* Define to 1 if you have the <openssl/dsa.h> header file. */
453 #define HAVE_OPENSSL_DSA_H 1
455 /* Define to 1 if you have the <openssl/engine.h> header file. */
456 #define HAVE_OPENSSL_ENGINE_H 1
458 /* Define to 1 if you have the <openssl/err.h> header file. */
459 #define HAVE_OPENSSL_ERR_H 1
461 /* Define to 1 if you have the `OPENSSL_init_crypto' function. */
462 #define HAVE_OPENSSL_INIT_CRYPTO 1
464 /* Define to 1 if you have the `OPENSSL_init_ssl' function. */
465 #define HAVE_OPENSSL_INIT_SSL 1
467 /* Define to 1 if you have the <openssl/param_build.h> header file. */
468 /* #undef HAVE_OPENSSL_PARAM_BUILD_H */
470 /* Define to 1 if you have the <openssl/rand.h> header file. */
471 #define HAVE_OPENSSL_RAND_H 1
473 /* Define to 1 if you have the <openssl/rsa.h> header file. */
474 #define HAVE_OPENSSL_RSA_H 1
476 /* Define to 1 if you have the <openssl/ssl.h> header file. */
477 #define HAVE_OPENSSL_SSL_H 1
479 /* Define to 1 if you have the `OSSL_PARAM_BLD_new' function. */
480 /* #undef HAVE_OSSL_PARAM_BLD_NEW */
482 /* Define to 1 if you have the `poll' function. */
485 /* Define to 1 if you have the <poll.h> header file. */
486 #define HAVE_POLL_H 1
488 /* Define if you have POSIX threads libraries and header files. */
489 #define HAVE_PTHREAD 1
491 /* Have PTHREAD_PRIO_INHERIT. */
492 #define HAVE_PTHREAD_PRIO_INHERIT 1
494 /* Define to 1 if the system has the type `pthread_rwlock_t'. */
495 #define HAVE_PTHREAD_RWLOCK_T 1
497 /* Define to 1 if the system has the type `pthread_spinlock_t'. */
498 #define HAVE_PTHREAD_SPINLOCK_T 1
500 /* Define to 1 if you have the <pwd.h> header file. */
503 /* Define if you have Python libraries and header files. */
504 /* #undef HAVE_PYTHON */
506 /* Define to 1 if you have the `random' function. */
507 #define HAVE_RANDOM 1
509 /* Define to 1 if you have the `RAND_cleanup' function. */
510 /* #undef HAVE_RAND_CLEANUP */
512 /* If we have reallocarray(3) */
513 #define HAVE_REALLOCARRAY 1
515 /* Define to 1 if you have the `recvmsg' function. */
516 #define HAVE_RECVMSG 1
518 /* Define to 1 if you have the `sendmsg' function. */
519 #define HAVE_SENDMSG 1
521 /* Define to 1 if you have the `setregid' function. */
522 /* #undef HAVE_SETREGID */
524 /* Define to 1 if you have the `setresgid' function. */
525 #define HAVE_SETRESGID 1
527 /* Define to 1 if you have the `setresuid' function. */
528 #define HAVE_SETRESUID 1
530 /* Define to 1 if you have the `setreuid' function. */
531 /* #undef HAVE_SETREUID */
533 /* Define to 1 if you have the `setrlimit' function. */
534 #define HAVE_SETRLIMIT 1
536 /* Define to 1 if you have the `setsid' function. */
537 #define HAVE_SETSID 1
539 /* Define to 1 if you have the `setusercontext' function. */
540 #define HAVE_SETUSERCONTEXT 1
542 /* Define to 1 if you have the `SHA512_Update' function. */
543 /* #undef HAVE_SHA512_UPDATE */
545 /* Define to 1 if you have the `shmget' function. */
546 #define HAVE_SHMGET 1
548 /* Define to 1 if you have the `sigprocmask' function. */
549 #define HAVE_SIGPROCMASK 1
551 /* Define to 1 if you have the `sleep' function. */
554 /* Define to 1 if you have the `snprintf' function. */
555 #define HAVE_SNPRINTF 1
557 /* Define to 1 if you have the `socketpair' function. */
558 #define HAVE_SOCKETPAIR 1
560 /* Using Solaris threads */
561 /* #undef HAVE_SOLARIS_THREADS */
563 /* Define to 1 if you have the `srandom' function. */
564 #define HAVE_SRANDOM 1
566 /* Define if you have the SSL libraries installed. */
567 #define HAVE_SSL /**/
569 /* Define to 1 if you have the `SSL_CTX_set_alpn_protos' function. */
570 #define HAVE_SSL_CTX_SET_ALPN_PROTOS 1
572 /* Define to 1 if you have the `SSL_CTX_set_alpn_select_cb' function. */
573 #define HAVE_SSL_CTX_SET_ALPN_SELECT_CB 1
575 /* Define to 1 if you have the `SSL_CTX_set_ciphersuites' function. */
576 #define HAVE_SSL_CTX_SET_CIPHERSUITES 1
578 /* Define to 1 if you have the `SSL_CTX_set_security_level' function. */
579 #define HAVE_SSL_CTX_SET_SECURITY_LEVEL 1
581 /* Define to 1 if you have the `SSL_CTX_set_tlsext_ticket_key_evp_cb'
583 /* #undef HAVE_SSL_CTX_SET_TLSEXT_TICKET_KEY_EVP_CB */
585 /* Define to 1 if you have the `SSL_get0_alpn_selected' function. */
586 #define HAVE_SSL_GET0_ALPN_SELECTED 1
588 /* Define to 1 if you have the `SSL_get0_peername' function. */
589 #define HAVE_SSL_GET0_PEERNAME 1
591 /* Define to 1 if you have the `SSL_get1_peer_certificate' function. */
592 /* #undef HAVE_SSL_GET1_PEER_CERTIFICATE */
594 /* Define to 1 if you have the `SSL_set1_host' function. */
595 #define HAVE_SSL_SET1_HOST 1
597 /* Define to 1 if you have the <stdarg.h> header file. */
598 #define HAVE_STDARG_H 1
600 /* Define to 1 if you have the <stdbool.h> header file. */
601 #define HAVE_STDBOOL_H 1
603 /* Define to 1 if you have the <stdint.h> header file. */
604 #define HAVE_STDINT_H 1
606 /* Define to 1 if you have the <stdio.h> header file. */
607 #define HAVE_STDIO_H 1
609 /* Define to 1 if you have the <stdlib.h> header file. */
610 #define HAVE_STDLIB_H 1
612 /* Define to 1 if you have the `strftime' function. */
613 #define HAVE_STRFTIME 1
615 /* Define to 1 if you have the <strings.h> header file. */
616 #define HAVE_STRINGS_H 1
618 /* Define to 1 if you have the <string.h> header file. */
619 #define HAVE_STRING_H 1
621 /* Define to 1 if you have the `strlcat' function. */
622 #define HAVE_STRLCAT 1
624 /* Define to 1 if you have the `strlcpy' function. */
625 #define HAVE_STRLCPY 1
627 /* Define to 1 if you have the `strptime' function. */
628 #define HAVE_STRPTIME 1
630 /* Define to 1 if you have the `strsep' function. */
631 #define HAVE_STRSEP 1
633 /* Define to 1 if `ipi_spec_dst' is a member of `struct in_pktinfo'. */
634 /* #undef HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST */
636 /* Define to 1 if `sun_len' is a member of `struct sockaddr_un'. */
637 #define HAVE_STRUCT_SOCKADDR_UN_SUN_LEN 1
639 /* Define if you have Swig libraries and header files. */
640 /* #undef HAVE_SWIG */
642 /* Define to 1 if you have the <syslog.h> header file. */
643 #define HAVE_SYSLOG_H 1
645 /* Define to 1 if systemd should be used */
646 /* #undef HAVE_SYSTEMD */
648 /* Define to 1 if you have the <sys/endian.h> header file. */
649 #define HAVE_SYS_ENDIAN_H 1
651 /* Define to 1 if you have the <sys/ipc.h> header file. */
652 #define HAVE_SYS_IPC_H 1
654 /* Define to 1 if you have the <sys/param.h> header file. */
655 #define HAVE_SYS_PARAM_H 1
657 /* Define to 1 if you have the <sys/resource.h> header file. */
658 #define HAVE_SYS_RESOURCE_H 1
660 /* Define to 1 if you have the <sys/select.h> header file. */
661 #define HAVE_SYS_SELECT_H 1
663 /* Define to 1 if you have the <sys/sha2.h> header file. */
664 /* #undef HAVE_SYS_SHA2_H */
666 /* Define to 1 if you have the <sys/shm.h> header file. */
667 #define HAVE_SYS_SHM_H 1
669 /* Define to 1 if you have the <sys/socket.h> header file. */
670 #define HAVE_SYS_SOCKET_H 1
672 /* Define to 1 if you have the <sys/stat.h> header file. */
673 #define HAVE_SYS_STAT_H 1
675 /* Define to 1 if you have the <sys/sysctl.h> header file. */
676 /* #undef HAVE_SYS_SYSCTL_H */
678 /* Define to 1 if you have the <sys/types.h> header file. */
679 #define HAVE_SYS_TYPES_H 1
681 /* Define to 1 if you have the <sys/uio.h> header file. */
682 #define HAVE_SYS_UIO_H 1
684 /* Define to 1 if you have the <sys/un.h> header file. */
685 #define HAVE_SYS_UN_H 1
687 /* Define to 1 if you have the <sys/wait.h> header file. */
688 #define HAVE_SYS_WAIT_H 1
690 /* Define to 1 if you have the <TargetConditionals.h> header file. */
691 /* #undef HAVE_TARGETCONDITIONALS_H */
693 /* Define to 1 if you have the <time.h> header file. */
694 #define HAVE_TIME_H 1
696 /* Define to 1 if you have the `tzset' function. */
699 /* Define to 1 if you have the <unistd.h> header file. */
700 #define HAVE_UNISTD_H 1
702 /* Define to 1 if you have the `usleep' function. */
703 #define HAVE_USLEEP 1
705 /* Define to 1 if you have the `vfork' function. */
708 /* Define to 1 if you have the <vfork.h> header file. */
709 /* #undef HAVE_VFORK_H */
711 /* Define to 1 if you have the <wchar.h> header file. */
712 #define HAVE_WCHAR_H 1
714 /* Define to 1 if you have the <windows.h> header file. */
715 /* #undef HAVE_WINDOWS_H */
717 /* Using Windows threads */
718 /* #undef HAVE_WINDOWS_THREADS */
720 /* Define to 1 if you have the <winsock2.h> header file. */
721 /* #undef HAVE_WINSOCK2_H */
723 /* Define to 1 if `fork' works. */
724 #define HAVE_WORKING_FORK 1
726 /* Define to 1 if `vfork' works. */
727 #define HAVE_WORKING_VFORK 1
729 /* Define to 1 if you have the `writev' function. */
730 #define HAVE_WRITEV 1
732 /* Define to 1 if you have the <ws2tcpip.h> header file. */
733 /* #undef HAVE_WS2TCPIP_H */
735 /* Define to 1 if you have the `X509_VERIFY_PARAM_set1_host' function. */
736 #define HAVE_X509_VERIFY_PARAM_SET1_HOST 1
738 /* Define to 1 if you have the `_beginthreadex' function. */
739 /* #undef HAVE__BEGINTHREADEX */
741 /* If HMAC_Init_ex() returns void */
742 /* #undef HMAC_INIT_EX_RETURNS_VOID */
744 /* if lex has yylex_destroy */
745 #define LEX_HAS_YYLEX_DESTROY 1
747 /* Define to the sub-directory where libtool stores uninstalled libraries. */
748 #define LT_OBJDIR ".libs/"
750 /* Define to the maximum message length to pass to syslog. */
751 #define MAXSYSLOGMSGLEN 10240
753 /* Define if memcmp() does not compare unsigned bytes */
754 /* #undef MEMCMP_IS_BROKEN */
756 /* Define if mkdir has one argument. */
757 /* #undef MKDIR_HAS_ONE_ARG */
759 /* Define if the network stack does not fully support nonblocking io (causes
760 lower performance). */
761 /* #undef NONBLOCKING_IS_BROKEN */
763 /* Put -D_ALL_SOURCE define in config.h */
764 /* #undef OMITTED__D_ALL_SOURCE */
766 /* Put -D_BSD_SOURCE define in config.h */
767 /* #undef OMITTED__D_BSD_SOURCE */
769 /* Put -D_DEFAULT_SOURCE define in config.h */
770 /* #undef OMITTED__D_DEFAULT_SOURCE */
772 /* Put -D_GNU_SOURCE define in config.h */
773 /* #undef OMITTED__D_GNU_SOURCE */
775 /* Put -D_LARGEFILE_SOURCE=1 define in config.h */
776 /* #undef OMITTED__D_LARGEFILE_SOURCE_1 */
778 /* Put -D_POSIX_C_SOURCE=200112 define in config.h */
779 /* #undef OMITTED__D_POSIX_C_SOURCE_200112 */
781 /* Put -D_XOPEN_SOURCE=600 define in config.h */
782 /* #undef OMITTED__D_XOPEN_SOURCE_600 */
784 /* Put -D_XOPEN_SOURCE_EXTENDED=1 define in config.h */
785 /* #undef OMITTED__D_XOPEN_SOURCE_EXTENDED_1 */
787 /* Put -D__EXTENSIONS__ define in config.h */
788 /* #undef OMITTED__D__EXTENSIONS__ */
790 /* Define to the address where bug reports for this package should be sent. */
791 #define PACKAGE_BUGREPORT "unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues"
793 /* Define to the full name of this package. */
794 #define PACKAGE_NAME "unbound"
796 /* Define to the full name and version of this package. */
797 #define PACKAGE_STRING "unbound 1.17.1"
799 /* Define to the one symbol short name of this package. */
800 #define PACKAGE_TARNAME "unbound"
802 /* Define to the home page for this package. */
803 #define PACKAGE_URL ""
805 /* Define to the version of this package. */
806 #define PACKAGE_VERSION "1.17.1"
808 /* default pidfile location */
809 #define PIDFILE "/var/unbound/unbound.pid"
811 /* Define to necessary symbol if this constant uses a non-standard name on
813 /* #undef PTHREAD_CREATE_JOINABLE */
815 /* Return type of signal handlers, but autoconf 2.70 says 'your code may
816 safely assume C89 semantics that RETSIGTYPE is void.' */
817 #define RETSIGTYPE void
819 /* if REUSEPORT is enabled by default */
820 #define REUSEPORT_DEFAULT 0
822 /* default rootkey location */
823 #define ROOT_ANCHOR_FILE "/var/unbound/root.key"
825 /* default rootcert location */
826 #define ROOT_CERT_FILE "/var/unbound/icannbundle.pem"
828 /* version number for resource files */
829 #define RSRC_PACKAGE_VERSION 1,17,1,0
831 /* Directory to chdir to */
832 #define RUN_DIR "/var/unbound"
835 #define SHARE_DIR "/var/unbound"
838 /* The size of `size_t', as computed by sizeof. */
839 #define SIZEOF_SIZE_T 8
840 /* The size of `size_t'. */
841 /* The size of `pthread_t', as computed by sizeof. */
842 #define SIZEOF_PTHREAD_T 8
844 #define SIZEOF_SIZE_T 4
845 /* The size of `size_t'. */
846 /* The size of `pthread_t', as computed by sizeof. */
847 #define SIZEOF_PTHREAD_T 4
850 /* The size of `time_t', as computed by sizeof. */
852 #define SIZEOF_TIME_T 4
854 #define SIZEOF_TIME_T 8
857 /* The size of `unsigned long', as computed by sizeof. */
859 #define SIZEOF_UNSIGNED_LONG 8
861 #define SIZEOF_UNSIGNED_LONG 4
864 /* define if (v)snprintf does not return length needed, (but length used) */
865 /* #undef SNPRINTF_RET_BROKEN */
867 /* Define to 1 if libsodium supports sodium_set_misuse_handler */
868 /* #undef SODIUM_MISUSE_HANDLER */
870 /* Define to 1 if all of the C90 standard headers exist (not just the ones
871 required in a freestanding environment). This macro is provided for
872 backward compatibility; new code need not use it. */
873 #define STDC_HEADERS 1
875 /* use default strptime. */
876 #define STRPTIME_WORKS 1
878 /* Use win32 resources and API */
879 /* #undef UB_ON_WINDOWS */
881 /* the SYSLOG_FACILITY to use, default LOG_DAEMON */
882 #define UB_SYSLOG_FACILITY LOG_DAEMON
884 /* default username */
885 #define UB_USERNAME "unbound"
887 /* use to enable lightweight alloc assertions, for debug use */
888 /* #undef UNBOUND_ALLOC_LITE */
890 /* use malloc not regions, for debug use */
891 /* #undef UNBOUND_ALLOC_NONREGIONAL */
893 /* use statistics for allocs and frees, for debug use */
894 /* #undef UNBOUND_ALLOC_STATS */
896 /* define this to enable debug checks. */
897 /* #undef UNBOUND_DEBUG */
899 /* Define to 1 to use cachedb support */
900 /* #undef USE_CACHEDB */
902 /* Define to 1 to enable dnscrypt support */
903 /* #undef USE_DNSCRYPT */
905 /* Define to 1 to enable dnscrypt with xchacha20 support */
906 /* #undef USE_DNSCRYPT_XCHACHA20 */
908 /* Define to 1 to enable dnstap support */
909 /* #undef USE_DNSTAP */
911 /* Define this to enable DSA support. */
914 /* Define this to enable ECDSA support. */
917 /* Define this to enable an EVP workaround for older openssl */
918 /* #undef USE_ECDSA_EVP_WORKAROUND */
920 /* Define this to enable ED25519 support. */
921 #define USE_ED25519 1
923 /* Define this to enable ED448 support. */
926 /* Define this to enable GOST support. */
927 /* #undef USE_GOST */
929 /* Define to 1 to use ipsecmod support. */
930 /* #undef USE_IPSECMOD */
932 /* Define to 1 to use ipset support */
933 /* #undef USE_IPSET */
935 /* Define if you enable libevent */
936 #define USE_LIBEVENT 1
938 /* Define this to enable use of /proc/sys/net/ipv4/ip_local_port_range as a
939 default outgoing port range. This is only for the libunbound on Linux and
940 does not affect unbound resolving daemon itself. This may severely limit
941 the number of available outgoing ports and thus decrease randomness. Define
942 this only when the target system restricts (e.g. some of SELinux enabled
943 distributions) the use of non-ephemeral ports. */
944 /* #undef USE_LINUX_IP_LOCAL_PORT_RANGE */
946 /* Define if you want to use internal select based events */
947 #define USE_MINI_EVENT 1
949 /* Define this to enable client TCP Fast Open. */
950 /* #undef USE_MSG_FASTOPEN */
952 /* Define this to enable client TCP Fast Open. */
953 /* #undef USE_OSX_MSG_FASTOPEN */
955 /* Define this to use hiredis client. */
956 /* #undef USE_REDIS */
958 /* Define this to enable SHA1 support. */
961 /* Define this to enable SHA256 and SHA512 support. */
964 /* Enable extensions on AIX 3, Interix. */
966 # define _ALL_SOURCE 1
968 /* Enable general extensions on macOS. */
969 #ifndef _DARWIN_C_SOURCE
970 # define _DARWIN_C_SOURCE 1
972 /* Enable general extensions on Solaris. */
973 #ifndef __EXTENSIONS__
974 # define __EXTENSIONS__ 1
976 /* Enable GNU extensions on systems that have them. */
978 # define _GNU_SOURCE 1
980 /* Enable X/Open compliant socket functions that do not require linking
981 with -lxnet on HP-UX 11.11. */
982 #ifndef _HPUX_ALT_XOPEN_SOCKET_API
983 # define _HPUX_ALT_XOPEN_SOCKET_API 1
985 /* Identify the host operating system as Minix.
986 This macro does not affect the system headers' behavior.
987 A future release of Autoconf may stop defining this macro. */
991 /* Enable general extensions on NetBSD.
992 Enable NetBSD compatibility extensions on Minix. */
993 #ifndef _NETBSD_SOURCE
994 # define _NETBSD_SOURCE 1
996 /* Enable OpenBSD compatibility extensions on NetBSD.
997 Oddly enough, this does nothing on OpenBSD. */
998 #ifndef _OPENBSD_SOURCE
999 # define _OPENBSD_SOURCE 1
1001 /* Define to 1 if needed for POSIX-compatible behavior. */
1002 #ifndef _POSIX_SOURCE
1003 /* # undef _POSIX_SOURCE */
1005 /* Define to 2 if needed for POSIX-compatible behavior. */
1006 #ifndef _POSIX_1_SOURCE
1007 /* # undef _POSIX_1_SOURCE */
1009 /* Enable POSIX-compatible threading on Solaris. */
1010 #ifndef _POSIX_PTHREAD_SEMANTICS
1011 # define _POSIX_PTHREAD_SEMANTICS 1
1013 /* Enable extensions specified by ISO/IEC TS 18661-5:2014. */
1014 #ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__
1015 # define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1
1017 /* Enable extensions specified by ISO/IEC TS 18661-1:2014. */
1018 #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
1019 # define __STDC_WANT_IEC_60559_BFP_EXT__ 1
1021 /* Enable extensions specified by ISO/IEC TS 18661-2:2015. */
1022 #ifndef __STDC_WANT_IEC_60559_DFP_EXT__
1023 # define __STDC_WANT_IEC_60559_DFP_EXT__ 1
1025 /* Enable extensions specified by ISO/IEC TS 18661-4:2015. */
1026 #ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__
1027 # define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1
1029 /* Enable extensions specified by ISO/IEC TS 18661-3:2015. */
1030 #ifndef __STDC_WANT_IEC_60559_TYPES_EXT__
1031 # define __STDC_WANT_IEC_60559_TYPES_EXT__ 1
1033 /* Enable extensions specified by ISO/IEC TR 24731-2:2010. */
1034 #ifndef __STDC_WANT_LIB_EXT2__
1035 # define __STDC_WANT_LIB_EXT2__ 1
1037 /* Enable extensions specified by ISO/IEC 24747:2009. */
1038 #ifndef __STDC_WANT_MATH_SPEC_FUNCS__
1039 # define __STDC_WANT_MATH_SPEC_FUNCS__ 1
1041 /* Enable extensions on HP NonStop. */
1042 #ifndef _TANDEM_SOURCE
1043 # define _TANDEM_SOURCE 1
1045 /* Enable X/Open extensions. Define to 500 only if necessary
1046 to make mbstate_t available. */
1047 #ifndef _XOPEN_SOURCE
1048 /* # undef _XOPEN_SOURCE */
1052 /* Define this to enable server TCP Fast Open. */
1053 /* #undef USE_TCP_FASTOPEN */
1055 /* Whether the windows socket API is used */
1056 /* #undef USE_WINSOCK */
1058 /* the version of the windows API enabled */
1059 #define WINVER 0x0502
1061 /* Define if you want dynlib module. */
1062 /* #undef WITH_DYNLIBMODULE */
1064 /* Define if you want Python module. */
1065 /* #undef WITH_PYTHONMODULE */
1067 /* Define if you want PyUnbound. */
1068 /* #undef WITH_PYUNBOUND */
1070 /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
1072 #define YYTEXT_POINTER 1
1074 /* Number of bits in a file offset, on hosts where this is settable. */
1075 /* #undef _FILE_OFFSET_BITS */
1077 /* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
1078 /* #undef _LARGEFILE_SOURCE */
1080 /* Define for large files, on AIX-style hosts. */
1081 /* #undef _LARGE_FILES */
1083 /* Enable for compile on Minix */
1084 #define _NETBSD_SOURCE 1
1086 /* defined to use gcc ansi snprintf and sscanf that understands %lld when
1087 compiled for windows. */
1088 /* #undef __USE_MINGW_ANSI_STDIO */
1090 /* Define to empty if `const' does not conform to ANSI C. */
1093 /* Define to `int' if <sys/types.h> doesn't define. */
1097 /* #undef in_addr_t */
1100 /* #undef in_port_t */
1102 /* Define to `__inline__' or `__inline' if that's what the C compiler
1103 calls it, or to nothing if 'inline' is not supported under any name. */
1108 /* Define to `short' if <sys/types.h> does not define. */
1109 /* #undef int16_t */
1111 /* Define to `int' if <sys/types.h> does not define. */
1112 /* #undef int32_t */
1114 /* Define to `long long' if <sys/types.h> does not define. */
1115 /* #undef int64_t */
1117 /* Define to `signed char' if <sys/types.h> does not define. */
1120 /* Define if replacement function should be used. */
1123 /* Define to `long int' if <sys/types.h> does not define. */
1126 /* Define as a signed integer type capable of holding a process identifier. */
1129 /* Define to 'int' if not defined */
1132 /* Define to `unsigned int' if <sys/types.h> does not define. */
1135 /* Define to 'int' if not defined */
1136 /* #undef socklen_t */
1138 /* Define to `int' if <sys/types.h> does not define. */
1139 /* #undef ssize_t */
1141 /* Define to 'unsigned char if not defined */
1144 /* Define to `int' if <sys/types.h> doesn't define. */
1147 /* Define to `unsigned short' if <sys/types.h> does not define. */
1148 /* #undef uint16_t */
1150 /* Define to `unsigned int' if <sys/types.h> does not define. */
1151 /* #undef uint32_t */
1153 /* Define to `unsigned long long' if <sys/types.h> does not define. */
1154 /* #undef uint64_t */
1156 /* Define to `unsigned char' if <sys/types.h> does not define. */
1157 /* #undef uint8_t */
1159 /* Define as `fork' if `vfork' does not work. */
1162 #if defined(OMITTED__D_GNU_SOURCE) && !defined(_GNU_SOURCE)
1163 #define _GNU_SOURCE 1
1166 #if defined(OMITTED__D_BSD_SOURCE) && !defined(_BSD_SOURCE)
1167 #define _BSD_SOURCE 1
1170 #if defined(OMITTED__D_DEFAULT_SOURCE) && !defined(_DEFAULT_SOURCE)
1171 #define _DEFAULT_SOURCE 1
1174 #if defined(OMITTED__D__EXTENSIONS__) && !defined(__EXTENSIONS__)
1175 #define __EXTENSIONS__ 1
1178 #if defined(OMITTED__D_POSIX_C_SOURCE_200112) && !defined(_POSIX_C_SOURCE)
1179 #define _POSIX_C_SOURCE 200112
1182 #if defined(OMITTED__D_XOPEN_SOURCE_600) && !defined(_XOPEN_SOURCE)
1183 #define _XOPEN_SOURCE 600
1186 #if defined(OMITTED__D_XOPEN_SOURCE_EXTENDED_1) && !defined(_XOPEN_SOURCE_EXTENDED)
1187 #define _XOPEN_SOURCE_EXTENDED 1
1190 #if defined(OMITTED__D_ALL_SOURCE) && !defined(_ALL_SOURCE)
1191 #define _ALL_SOURCE 1
1194 #if defined(OMITTED__D_LARGEFILE_SOURCE_1) && !defined(_LARGEFILE_SOURCE)
1195 #define _LARGEFILE_SOURCE 1
1201 #ifndef _OPENBSD_SOURCE
1202 #define _OPENBSD_SOURCE 1
1205 #ifndef UNBOUND_DEBUG
1211 /** Use small-ldns codebase */
1214 # define LDNS_BUILD_CONFIG_HAVE_SSL 1
1227 #ifdef HAVE_STDARG_H
1231 #ifdef HAVE_STDINT_H
1237 #if HAVE_SYS_PARAM_H
1238 #include <sys/param.h>
1241 #ifdef HAVE_SYS_SOCKET_H
1242 #include <sys/socket.h>
1245 #ifdef HAVE_SYS_UIO_H
1246 #include <sys/uio.h>
1249 #ifdef HAVE_NETINET_IN_H
1250 #include <netinet/in.h>
1253 #ifdef HAVE_NETINET_TCP_H
1254 #include <netinet/tcp.h>
1257 #ifdef HAVE_ARPA_INET_H
1258 #include <arpa/inet.h>
1261 #ifdef HAVE_WINSOCK2_H
1262 #include <winsock2.h>
1265 #ifdef HAVE_WS2TCPIP_H
1266 #include <ws2tcpip.h>
1269 #if !defined(USE_WINSOCK) || !defined(HAVE_SNPRINTF) || defined(SNPRINTF_RET_BROKEN) || defined(__USE_MINGW_ANSI_STDIO)
1270 #define ARG_LL "%ll"
1272 #define ARG_LL "%I64"
1276 #define AF_LOCAL AF_UNIX
1281 #ifdef HAVE_ATTR_FORMAT
1282 # define ATTR_FORMAT(archetype, string_index, first_to_check) \
1283 __attribute__ ((format (archetype, string_index, first_to_check)))
1284 #else /* !HAVE_ATTR_FORMAT */
1285 # define ATTR_FORMAT(archetype, string_index, first_to_check) /* empty */
1286 #endif /* !HAVE_ATTR_FORMAT */
1289 #if defined(DOXYGEN)
1290 # define ATTR_UNUSED(x) x
1291 #elif defined(__cplusplus)
1292 # define ATTR_UNUSED(x)
1293 #elif defined(HAVE_ATTR_UNUSED)
1294 # define ATTR_UNUSED(x) x __attribute__((unused))
1295 #else /* !HAVE_ATTR_UNUSED */
1296 # define ATTR_UNUSED(x) x
1297 #endif /* !HAVE_ATTR_UNUSED */
1301 #define fseeko fseek
1302 #define ftello ftell
1303 #endif /* HAVE_FSEEKO */
1306 #ifndef MAXHOSTNAMELEN
1307 #define MAXHOSTNAMELEN 256
1310 #if !defined(HAVE_SNPRINTF) || defined(SNPRINTF_RET_BROKEN)
1311 #define snprintf snprintf_unbound
1312 #define vsnprintf vsnprintf_unbound
1314 int snprintf (char *str, size_t count, const char *fmt, ...);
1315 int vsnprintf (char *str, size_t count, const char *fmt, va_list arg);
1316 #endif /* HAVE_SNPRINTF or SNPRINTF_RET_BROKEN */
1318 #ifndef HAVE_INET_PTON
1319 #define inet_pton inet_pton_unbound
1320 int inet_pton(int af, const char* src, void* dst);
1321 #endif /* HAVE_INET_PTON */
1324 #ifndef HAVE_INET_NTOP
1325 #define inet_ntop inet_ntop_unbound
1326 const char *inet_ntop(int af, const void *src, char *dst, size_t size);
1330 #ifndef HAVE_INET_ATON
1331 #define inet_aton inet_aton_unbound
1332 int inet_aton(const char *cp, struct in_addr *addr);
1336 #ifndef HAVE_MEMMOVE
1337 #define memmove memmove_unbound
1338 void *memmove(void *dest, const void *src, size_t n);
1342 #ifndef HAVE_STRLCAT
1343 #define strlcat strlcat_unbound
1344 size_t strlcat(char *dst, const char *src, size_t siz);
1348 #ifndef HAVE_STRLCPY
1349 #define strlcpy strlcpy_unbound
1350 size_t strlcpy(char *dst, const char *src, size_t siz);
1354 #ifndef HAVE_GMTIME_R
1355 #define gmtime_r gmtime_r_unbound
1356 struct tm *gmtime_r(const time_t *timep, struct tm *result);
1360 #ifndef HAVE_REALLOCARRAY
1361 #define reallocarray reallocarrayunbound
1362 void* reallocarray(void *ptr, size_t nmemb, size_t size);
1366 #if !defined(HAVE_SLEEP) || defined(HAVE_WINDOWS_H)
1367 #define sleep(x) Sleep((x)*1000) /* on win32 */
1368 #endif /* HAVE_SLEEP */
1372 #define usleep(x) Sleep((x)/1000 + 1) /* on win32 */
1373 #endif /* HAVE_USLEEP */
1377 #define random rand /* on win32, for tests only (bad random) */
1378 #endif /* HAVE_RANDOM */
1381 #ifndef HAVE_SRANDOM
1382 #define srandom(x) srand(x) /* on win32, for tests only (bad random) */
1383 #endif /* HAVE_SRANDOM */
1386 /* detect if we need to cast to unsigned int for FD_SET to avoid warnings */
1387 #ifdef HAVE_WINSOCK2_H
1388 #define FD_SET_T (u_int)
1394 #ifndef IPV6_MIN_MTU
1395 #define IPV6_MIN_MTU 1280
1396 #endif /* IPV6_MIN_MTU */
1399 #ifdef MEMCMP_IS_BROKEN
1400 #include "compat/memcmp.h"
1401 #define memcmp memcmp_unbound
1402 int memcmp(const void *x, const void *y, size_t n);
1407 #ifndef HAVE_CTIME_R
1408 #define ctime_r unbound_ctime_r
1409 char *ctime_r(const time_t *timep, char *buf);
1413 #define strsep unbound_strsep
1414 char *strsep(char **stringp, const char *delim);
1417 #ifndef HAVE_ISBLANK
1418 #define isblank unbound_isblank
1422 #ifndef HAVE_EXPLICIT_BZERO
1423 #define explicit_bzero unbound_explicit_bzero
1424 void explicit_bzero(void* buf, size_t len);
1427 #if defined(HAVE_INET_NTOP) && !HAVE_DECL_INET_NTOP
1428 const char *inet_ntop(int af, const void *src, char *dst, size_t size);
1431 #if defined(HAVE_INET_PTON) && !HAVE_DECL_INET_PTON
1432 int inet_pton(int af, const char* src, void* dst);
1435 #if !defined(HAVE_STRPTIME) || !defined(STRPTIME_WORKS)
1436 #define strptime unbound_strptime
1438 char *strptime(const char *s, const char *format, struct tm *tm);
1441 #if !HAVE_DECL_REALLOCARRAY
1442 void *reallocarray(void *ptr, size_t nmemb, size_t size);
1446 #include <bsd/string.h>
1447 #include <bsd/stdlib.h>
1450 #ifdef HAVE_LIBRESSL
1451 # if !HAVE_DECL_STRLCPY
1452 size_t strlcpy(char *dst, const char *src, size_t siz);
1454 # if !HAVE_DECL_STRLCAT
1455 size_t strlcat(char *dst, const char *src, size_t siz);
1457 # if !HAVE_DECL_ARC4RANDOM && defined(HAVE_ARC4RANDOM)
1458 uint32_t arc4random(void);
1460 # if !HAVE_DECL_ARC4RANDOM_UNIFORM && defined(HAVE_ARC4RANDOM_UNIFORM)
1461 uint32_t arc4random_uniform(uint32_t upper_bound);
1463 #endif /* HAVE_LIBRESSL */
1464 #ifndef HAVE_ARC4RANDOM
1465 int getentropy(void* buf, size_t len);
1466 uint32_t arc4random(void);
1467 void arc4random_buf(void* buf, size_t n);
1468 void _ARC4_LOCK(void);
1469 void _ARC4_UNLOCK(void);
1470 void _ARC4_LOCK_DESTROY(void);
1472 #ifndef HAVE_ARC4RANDOM_UNIFORM
1473 uint32_t arc4random_uniform(uint32_t upper_bound);
1475 #ifdef COMPAT_SHA512
1476 #ifndef SHA512_DIGEST_LENGTH
1477 #define SHA512_BLOCK_LENGTH 128
1478 #define SHA512_DIGEST_LENGTH 64
1479 #define SHA512_DIGEST_STRING_LENGTH (SHA512_DIGEST_LENGTH * 2 + 1)
1480 typedef struct _SHA512_CTX {
1482 uint64_t bitcount[2];
1483 uint8_t buffer[SHA512_BLOCK_LENGTH];
1485 #endif /* SHA512_DIGEST_LENGTH */
1486 void SHA512_Init(SHA512_CTX*);
1487 void SHA512_Update(SHA512_CTX*, void*, size_t);
1488 void SHA512_Final(uint8_t[SHA512_DIGEST_LENGTH], SHA512_CTX*);
1489 unsigned char *SHA512(void* data, unsigned int data_len, unsigned char *digest);
1490 #endif /* COMPAT_SHA512 */
1494 #if defined(HAVE_EVENT_H) && !defined(HAVE_EVENT_BASE_ONCE) && !(defined(HAVE_EV_LOOP) || defined(HAVE_EV_DEFAULT_LOOP)) && (defined(HAVE_PTHREAD) || defined(HAVE_SOLARIS_THREADS))
1495 /* using version of libevent that is not threadsafe. */
1496 # define LIBEVENT_SIGNAL_PROBLEM 1
1499 #ifndef CHECKED_INET6
1500 # define CHECKED_INET6
1504 # define AF_INET6 28
1506 #endif /* CHECKED_INET6 */
1508 #ifndef HAVE_GETADDRINFO
1509 struct sockaddr_storage;
1510 #include "compat/fake-rfc2553.h"
1513 #ifdef UNBOUND_ALLOC_STATS
1514 # define malloc(s) unbound_stat_malloc_log(s, __FILE__, __LINE__, __func__)
1515 # define calloc(n,s) unbound_stat_calloc_log(n, s, __FILE__, __LINE__, __func__)
1516 # define free(p) unbound_stat_free_log(p, __FILE__, __LINE__, __func__)
1517 # define realloc(p,s) unbound_stat_realloc_log(p, s, __FILE__, __LINE__, __func__)
1518 void *unbound_stat_malloc(size_t size);
1519 void *unbound_stat_calloc(size_t nmemb, size_t size);
1520 void unbound_stat_free(void *ptr);
1521 void *unbound_stat_realloc(void *ptr, size_t size);
1522 void *unbound_stat_malloc_log(size_t size, const char* file, int line,
1524 void *unbound_stat_calloc_log(size_t nmemb, size_t size, const char* file,
1525 int line, const char* func);
1526 void unbound_stat_free_log(void *ptr, const char* file, int line,
1528 void *unbound_stat_realloc_log(void *ptr, size_t size, const char* file,
1529 int line, const char* func);
1530 #elif defined(UNBOUND_ALLOC_LITE)
1531 # include "util/alloc.h"
1532 #endif /* UNBOUND_ALLOC_LITE and UNBOUND_ALLOC_STATS */
1534 /** default port for DNS traffic. */
1535 #define UNBOUND_DNS_PORT 53
1536 /** default port for DNS over TLS traffic. */
1537 #define UNBOUND_DNS_OVER_TLS_PORT 853
1538 /** default port for DNS over HTTPS traffic. */
1539 #define UNBOUND_DNS_OVER_HTTPS_PORT 443
1540 /** default port for unbound control traffic, registered port with IANA,
1541 ub-dns-control 8953/tcp unbound dns nameserver control */
1542 #define UNBOUND_CONTROL_PORT 8953
1543 /** the version of unbound-control that this software implements */
1544 #define UNBOUND_CONTROL_VERSION 1