aboutsummaryrefslogtreecommitdiff
path: root/nss
diff options
context:
space:
mode:
Diffstat (limited to 'nss')
-rw-r--r--nss/getXXent_r.c10
-rw-r--r--nss/getent.c3
2 files changed, 9 insertions, 4 deletions
diff --git a/nss/getXXent_r.c b/nss/getXXent_r.c
index e0ba98b59a..4e45ec1c15 100644
--- a/nss/getXXent_r.c
+++ b/nss/getXXent_r.c
@@ -22,6 +22,10 @@
#include "nsswitch.h"
+#ifdef NEED__RES
+# include <resolv.h>
+#endif
+
/*******************************************************************\
|* Here we assume several symbols to be defined: *|
|* *|
@@ -149,7 +153,7 @@ SETFUNC_NAME (STAYOPEN)
int no_more;
#ifdef NEED__RES
- if ((_res.options & RES_INIT) == 0 && res_init () == -1)
+ if ((_res.options & RES_INIT) == 0 && __res_ninit (&_res) == -1)
{
__set_h_errno (NETDB_INTERNAL);
return;
@@ -187,7 +191,7 @@ ENDFUNC_NAME (void)
int no_more;
#ifdef NEED__RES
- if ((_res.options & RES_INIT) == 0 && res_init () == -1)
+ if ((_res.options & RES_INIT) == 0 && __res_ninit (&_res) == -1)
{
__set_h_errno (NETDB_INTERNAL);
return;
@@ -224,7 +228,7 @@ INTERNAL (REENTRANT_GETNAME) (LOOKUP_TYPE *resbuf, char *buffer, size_t buflen,
enum nss_status status;
#ifdef NEED__RES
- if ((_res.options & RES_INIT) == 0 && res_init () == -1)
+ if ((_res.options & RES_INIT) == 0 && __res_ninit (&_res) == -1)
{
__set_h_errno (NETDB_INTERNAL);
*result = NULL;
diff --git a/nss/getent.c b/nss/getent.c
index d3a9fde1e1..5834d790a0 100644
--- a/nss/getent.c
+++ b/nss/getent.c
@@ -257,8 +257,9 @@ print_hosts (struct hostent *host)
buf, sizeof (buf));
fputs (ip, stdout);
- for (i = strlen (ip); i < 16; ++i)
+ for (i = strlen (ip); i < 15; ++i)
fputs (" ", stdout);
+ fputs (" ", stdout);
fputs (host->h_name, stdout);
i = 0;