Skip to content

Commit 4ba6e6e

Browse files
committed
ADDRFAMILY to FAMILIY to port to FreeBSD.
git-svn-id: file:///svn/nsd/trunk@2512 a26ef69c-88ff-0310-839f-98b793d9c207
1 parent c749eb5 commit 4ba6e6e

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

doc/ChangeLog

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
29 November 2006: Wouter
22
- Fixed getaddrinfo error message to be more descriptive.
33
- Fallback to ip4 also if getaddrinfo fails for ip6.
4+
- instead of EAI_ADDRFAMILY uses EAI_FAMILY which is portable
5+
to FreeBSD.
6+
- signed/unsigned warning fix for FD_SETSIZE comparison.
47

58
28 November 2006: Wouter
69
- Debugging 10k zones transfer, set so that zones waiting for a

doc/RELNOTES

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ BUG FIXES:
1010
- Bug #153: Using thousands of zones, xfrd could run out of file
1111
descriptors. Fixed.
1212
- Fixed getaddrinfo error message to be more descriptive.
13+
- Fallback to ip4 if getaddrinfo fails for ip6.
1314

1415
3.0.2
1516
=============

netio.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ netio_dispatch(netio_type *netio, const struct timespec *timeout, const sigset_t
153153

154154
for (elt = netio->handlers; elt; elt = elt->next) {
155155
netio_handler_type *handler = elt->handler;
156-
if (handler->fd >= 0 && handler->fd < FD_SETSIZE) {
156+
if (handler->fd >= 0 && handler->fd < (int)FD_SETSIZE) {
157157
if (handler->fd > max_fd) {
158158
max_fd = handler->fd;
159159
}
@@ -235,7 +235,7 @@ netio_dispatch(netio_type *netio, const struct timespec *timeout, const sigset_t
235235
for (elt = netio->handlers; elt; ) {
236236
netio_handler_type *handler = elt->handler;
237237
netio->dispatch_next = elt->next;
238-
if (handler->fd >= 0 && handler->fd < FD_SETSIZE) {
238+
if (handler->fd >= 0 && handler->fd < (int)FD_SETSIZE) {
239239
netio_event_types_type event_types
240240
= NETIO_EVENT_NONE;
241241
if (FD_ISSET(handler->fd, &readfds)) {

nsd.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,7 @@ main (int argc, char *argv[])
641641
if ((r=getaddrinfo(nodes[i], udp_port, &hints[i], &nsd.udp[i].addr)) != 0) {
642642
#ifdef INET6
643643
if(nsd.grab_ip6_optional && hints[0].ai_family == AF_INET6
644-
&& r == EAI_ADDRFAMILY)
644+
&& r == EAI_FAMILY)
645645
continue;
646646
#endif
647647
error("cannot parse address '%s': getaddrinfo: %s %s",

0 commit comments

Comments
 (0)