diff options
author | Elliott Hughes <enh@google.com> | 2014-06-30 14:15:34 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2014-06-30 14:15:34 -0700 |
commit | a3117041035c72b843d7b59a0d1b33f70caad368 (patch) | |
tree | fbdb63bbb89ba3cec61d4f5c23cb3352192d2577 | |
parent | eac2bbf0fce2da710bb086414ad1054568747a42 (diff) | |
download | android_bionic-a3117041035c72b843d7b59a0d1b33f70caad368.tar.gz android_bionic-a3117041035c72b843d7b59a0d1b33f70caad368.tar.bz2 android_bionic-a3117041035c72b843d7b59a0d1b33f70caad368.zip |
Restore <nsswitch.h> which is BSD API, not private.
Also make nsdispatch non-hidden. Firefox uses it.
Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1030899
Change-Id: Iaccc1ec813d196ec91ac475fcc4ae9dca756861d
-rw-r--r-- | libc/dns/net/nsdispatch.c | 14 | ||||
-rw-r--r-- | libc/include/nsswitch.h (renamed from libc/dns/include/nsswitch.h) | 15 |
2 files changed, 5 insertions, 24 deletions
diff --git a/libc/dns/net/nsdispatch.c b/libc/dns/net/nsdispatch.c index 15282bed8..fb6d8f6ab 100644 --- a/libc/dns/net/nsdispatch.c +++ b/libc/dns/net/nsdispatch.c @@ -69,26 +69,14 @@ */ #include <sys/cdefs.h> -#include <sys/types.h> -#include <sys/param.h> -#include <sys/stat.h> #include <assert.h> -#ifdef __ELF__ -#include <dlfcn.h> -#endif /* __ELF__ */ -#include <fcntl.h> -#define _NS_PRIVATE #include <nsswitch.h> #include <stdarg.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> #include <strings.h> -#include <unistd.h> static nss_method -_nsmethod(const char *source, const char *database, const char *method, +_nsmethod(const char *source, const char *database __unused, const char *method __unused, const ns_dtab disp_tab[], void **cb_data) { int curdisp; diff --git a/libc/dns/include/nsswitch.h b/libc/include/nsswitch.h index e03844bd6..af88433f4 100644 --- a/libc/dns/include/nsswitch.h +++ b/libc/include/nsswitch.h @@ -1,4 +1,4 @@ -/* $NetBSD: nsswitch.h,v 1.18 2005/11/29 03:12:58 christos Exp $ */ +/* $NetBSD: nsswitch.h,v 1.21 2011/07/17 20:54:34 joerg Exp $ */ /*- * Copyright (c) 1997, 1998, 1999, 2004 The NetBSD Foundation, Inc. @@ -15,13 +15,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED @@ -137,6 +130,7 @@ typedef struct { #else # define NS_NIS_CB(F,C) #endif +#define NS_NULL_CB { .src = NULL }, /* * ns_src - `nsswitch source' @@ -149,7 +143,6 @@ typedef struct { } ns_src; -#if 0 /* * Default sourcelists (if nsswitch.conf is missing, corrupt, * or the requested database doesn't have an entry) @@ -161,7 +154,7 @@ extern const ns_src __nsdefaultfiles[]; extern const ns_src __nsdefaultfiles_forceall[]; extern const ns_src __nsdefaultnis[]; extern const ns_src __nsdefaultnis_forceall[]; -#endif + /* * ns_mtab - `nsswitch method table' @@ -222,7 +215,7 @@ typedef struct { __BEGIN_DECLS int nsdispatch(void *, const ns_dtab [], const char *, - const char *, const ns_src [], ...); + const char *, const ns_src [], ...) __LIBC_ABI_PUBLIC__; #ifdef _NS_PRIVATE int _nsdbtaddsrc(ns_dbt *, const ns_src *); |