fix: usr: Add a compatibility shim for older libuv versions (< 1.19.0)

The uv_stream_get_write_queue_size() is supported only in relatively newer versions of libuv (1.19.0 or higher).  Provide a compatibility shim for this function , so BIND 9 can be built in environments with older libuv version.

Fixes: #4822

Merge branch 'uv_stream_get_write_queue_size_wrapper' into 'bind-9.18'

See merge request isc-projects/bind9!9153
This commit is contained in:
Ondřej Surý
2024-08-05 10:29:41 +00:00

View File

@@ -124,3 +124,7 @@ isc_uv_udp_freebind(uv_udp_t *handle, const struct sockaddr *addr,
int
isc_uv_tcp_freebind(uv_tcp_t *handle, const struct sockaddr *addr,
unsigned int flags);
#if UV_VERSION_HEX < UV_VERSION(1, 19, 0)
#define uv_stream_get_write_queue_size(stream) ((stream)->write_queue_size)
#endif /* UV_VERSION_HEX < UV_VERSION(1, 19, 0) */