2 * This version of this file is derived from Android 2.3 "Gingerbread",
3 * which contains uncredited changes by Android/Google developers. It has
4 * been modified in 2011 for use in the Android build of Mozilla Firefox by
5 * Mozilla contributors (including Michael Edwards <m.k.edwards@gmail.com>,
6 * and Steve Workman <sjhworkman@gmail.com>).
7 * These changes are offered under the same license as the original NetBSD
8 * file, whose copyright and license are unchanged above.
11 #ifndef _RESOLV_STATIC_H
12 #define _RESOLV_STATIC_H
16 /* this structure contains all the variables that were declared
17 * 'static' in the original NetBSD resolver code.
19 * this caused vast amounts of crashes and memory corruptions
20 * when the resolver was being used by multiple threads.
22 * (note: the OpenBSD/FreeBSD resolver has similar 'issues')
28 typedef struct res_static
{
29 char* h_addr_ptrs
[MAXADDRS
+ 1];
30 char* host_aliases
[MAXALIASES
];
32 u_int32_t host_addr
[16 / sizeof(u_int32_t
)]; /* IPv4 or IPv6 */
35 const char* servent_ptr
;
36 struct servent servent
;
40 extern res_static
__res_get_static(void);
42 #endif /* _RESOLV_STATIC_H */