This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.
Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
On Sat, Jan 13, 2001 at 12:38:30PM +0100, Andreas Jaeger wrote: > > I have this one, plus I'm now hacking on getent additions > > (which can wait after 2.2.1 though). > > If your patch is correct, then the lookup_function is wrong, isn't it? Sure, I found that during make as well. I'll try to not post patches during late night hours next time... This actually compiles and works (tested using getent ethers 1:2:3:4:5:6). 2001-01-13 Jakub Jelinek <jakub@redhat.com> * inet/ether_ntoh.c (lookup_function): Change arguments to match _nss_*_getntohost_r prototype. (ether_ntohost): Pass errno pointer to NSS function. --- libc/inet/ether_ntoh.c.jj Tue Jan 2 14:17:33 2001 +++ libc/inet/ether_ntoh.c Sat Jan 13 13:45:48 2001 @@ -17,6 +17,7 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#include <errno.h> #include <netinet/ether.h> #include <netinet/if_ether.h> #include <string.h> @@ -26,7 +27,7 @@ /* Type of the lookup function we need here. */ typedef int (*lookup_function) (const struct ether_addr *, struct etherent *, - char *, int); + char *, size_t, int *); /* The lookup function for the first entry of this service. */ extern int __nss_ethers_lookup (service_user **nip, const char *name, @@ -65,7 +66,7 @@ ether_ntohost (char *hostname, const str { char buffer[1024]; - status = (*fct) (addr, ðerent, buffer, sizeof buffer); + status = (*fct) (addr, ðerent, buffer, sizeof buffer, &errno); no_more = __nss_next (&nip, "getntohost_r", (void **) &fct, status, 0); } Jakub
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |