Sync with upstream OpenBSD.
Also some minor build cleanup.
Change-Id: Ibd20602d7ea45685f0c47fceb00ffd6c7ae35954
diff --git a/libc/dns/include/resolv_private.h b/libc/dns/include/resolv_private.h
index 0dab3d8..9484d0e 100644
--- a/libc/dns/include/resolv_private.h
+++ b/libc/dns/include/resolv_private.h
@@ -398,7 +398,6 @@
#define res_nisourserver __res_nisourserver
#define res_ownok __res_ownok
#define res_queriesmatch __res_queriesmatch
-#define res_randomid __res_randomid
#define sym_ntop __sym_ntop
#define sym_ntos __sym_ntos
#define sym_ston __sym_ston
@@ -454,7 +453,6 @@
const char * p_option(u_long);
char * p_secstodate(u_long);
int dn_count_labels(const char *);
-u_int res_randomid(void);
int res_nameinquery(const char *, int, int, const u_char *,
const u_char *);
int res_queriesmatch(const u_char *, const u_char *,
@@ -503,7 +501,11 @@
__LIBC_HIDDEN__ void res_setnetid(res_state, unsigned);
__LIBC_HIDDEN__ void res_setmark(res_state, unsigned);
-u_int res_randomid(void);
+
+// We use the OpenBSD __res_randomid...
+u_int __res_randomid(void);
+// ...but NetBSD calls it res_randomid.
+#define res_randomid __res_randomid
#ifdef __i386__
# define __socketcall extern __attribute__((__cdecl__))