aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'libc/dns/net/nsdispatch.c')
-rw-r--r--libc/dns/net/nsdispatch.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libc/dns/net/nsdispatch.c b/libc/dns/net/nsdispatch.c
index fb6d8f6a..d025592a 100644
--- a/libc/dns/net/nsdispatch.c
+++ b/libc/dns/net/nsdispatch.c
@@ -71,6 +71,7 @@
71#include <sys/cdefs.h> 71#include <sys/cdefs.h>
72 72
73#include <assert.h> 73#include <assert.h>
74#include <errno.h>
74#include <nsswitch.h> 75#include <nsswitch.h>
75#include <stdarg.h> 76#include <stdarg.h>
76#include <strings.h> 77#include <strings.h>
@@ -133,6 +134,10 @@ nsdispatch(void *retval, const ns_dtab disp_tab[], const char *database,
133 continue; 134 continue;
134 if (result & srclist[i].flags) 135 if (result & srclist[i].flags)
135 break; 136 break;
137 /* Stop trying next resolver when there is a memory space fatal error. */
138 if ((result & NS_UNAVAIL) != 0 && errno == ENOSPC) {
139 break;
140 }
136 } 141 }
137 } 142 }
138 result &= NS_STATUSMASK; /* clear private flags in result */ 143 result &= NS_STATUSMASK; /* clear private flags in result */