mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 06:25:31 +00:00
Get rid of some HTTP/2 related types when NGHTTP2 is not available
This commit removes definitions of some DoH-related types when libnghttp2 is not available.
This commit is contained in:
@@ -314,15 +314,6 @@ typedef union {
|
||||
isc_nm_accept_cb_t accept;
|
||||
} isc__nm_cb_t;
|
||||
|
||||
typedef struct isc_nm_httphandler isc_nm_httphandler_t;
|
||||
struct isc_nm_httphandler {
|
||||
char *path;
|
||||
isc_nm_recv_cb_t cb;
|
||||
void *cbarg;
|
||||
size_t extrahandlesize;
|
||||
LINK(isc_nm_httphandler_t) link;
|
||||
};
|
||||
|
||||
/*
|
||||
* Wrapper around uv_req_t with 'our' fields in it. req->data should
|
||||
* always point to its parent. Note that we always allocate more than
|
||||
@@ -755,6 +746,7 @@ enum {
|
||||
STATID_ACTIVE = 10
|
||||
};
|
||||
|
||||
#if HAVE_LIBNGHTTP2
|
||||
typedef struct isc_nmsocket_tls_send_req {
|
||||
isc_nmsocket_t *tlssock;
|
||||
isc_region_t data;
|
||||
@@ -782,6 +774,14 @@ typedef struct isc_nm_httpcbarg {
|
||||
LINK(struct isc_nm_httpcbarg) link;
|
||||
} isc_nm_httpcbarg_t;
|
||||
|
||||
typedef struct isc_nm_httphandler {
|
||||
char *path;
|
||||
isc_nm_recv_cb_t cb;
|
||||
void *cbarg;
|
||||
size_t extrahandlesize;
|
||||
LINK(struct isc_nm_httphandler) link;
|
||||
} isc_nm_httphandler_t;
|
||||
|
||||
struct isc_nm_http_endpoints {
|
||||
isc_mem_t *mctx;
|
||||
|
||||
@@ -836,6 +836,7 @@ typedef struct isc_nmsocket_h2 {
|
||||
void *cstream;
|
||||
} connect;
|
||||
} isc_nmsocket_h2_t;
|
||||
#endif /* HAVE_LIBNGHTTP2 */
|
||||
|
||||
typedef void (*isc_nm_closehandlecb_t)(void *arg);
|
||||
/*%<
|
||||
@@ -882,6 +883,7 @@ struct isc_nmsocket {
|
||||
isc__nm_uvreq_t *pending_req;
|
||||
} tls;
|
||||
|
||||
#if HAVE_LIBNGHTTP2
|
||||
/*% TLS stuff */
|
||||
struct tlsstream {
|
||||
bool server;
|
||||
@@ -902,6 +904,7 @@ struct isc_nmsocket {
|
||||
} tlsstream;
|
||||
|
||||
isc_nmsocket_h2_t h2;
|
||||
#endif /* HAVE_LIBNGHTTP2 */
|
||||
/*%
|
||||
* quota is the TCP client, attached when a TCP connection
|
||||
* is established. pquota is a non-attached pointer to the
|
||||
|
@@ -1515,7 +1515,9 @@ isc___nmsocket_init(isc_nmsocket_t *sock, isc_nm_t *mgr, isc_nmsocket_type type,
|
||||
isc_condition_init(&sock->scond);
|
||||
isc_refcount_init(&sock->references, 1);
|
||||
|
||||
#if HAVE_LIBNGHTTP2
|
||||
memset(&sock->tlsstream, 0, sizeof(sock->tlsstream));
|
||||
#endif /* HAVE_LIBNGHTTP2 */
|
||||
|
||||
NETMGR_TRACE_LOG("isc__nmsocket_init():%p->references = %" PRIuFAST32
|
||||
"\n",
|
||||
|
@@ -9,7 +9,7 @@
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
#if HAVE_CMOCKA
|
||||
#if defined(HAVE_CMOCKA) && defined(HAVE_LIBNGHTTP2)
|
||||
#include <inttypes.h>
|
||||
#include <sched.h> /* IWYU pragma: keep */
|
||||
#include <setjmp.h>
|
||||
@@ -2192,7 +2192,11 @@ main(void) {
|
||||
|
||||
int
|
||||
main(void) {
|
||||
#if HAVE_LIBNGHTTP2
|
||||
printf("1..0 # Skipped: cmocka not available\n");
|
||||
#else
|
||||
printf("1..0 # Skipped: libnghttp2 is not available\n");
|
||||
#endif
|
||||
return (SKIPPED_TEST_EXIT_CODE);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user