Update to FreeBSD Stable/9 2015-04-08

This commit is contained in:
Sebastian Huber
2015-04-08 15:37:49 +02:00
parent 76395ec881
commit 165dd8ea12
167 changed files with 5529 additions and 2365 deletions

View File

@@ -18,7 +18,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
static const char rcsid[] = "$Id: res_data.c,v 1.3.18.2 2007/09/14 05:35:47 marka Exp $";
static const char rcsid[] = "$Id: res_data.c,v 1.7 2008/12/11 09:59:00 marka Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
@@ -109,13 +109,6 @@ res_init(void) {
if (!(_res.options & RES_INIT))
_res.options = RES_DEFAULT;
/*
* This one used to initialize implicitly to zero, so unless the app
* has set it to something in particular, we can randomize it now.
*/
if (!_res.id)
_res.id = res_randomid();
return (__res_vinit(&_res, 1));
}
@@ -266,6 +259,16 @@ res_querydomain(const char *name,
answer, anslen));
}
u_int
res_randomid(void) {
if ((_res.options & RES_INIT) == 0U && res_init() == -1) {
RES_SET_H_ERRNO(&_res, NETDB_INTERNAL);
return (-1);
}
return (res_nrandomid(&_res));
}
int
res_opt(int n0, u_char *buf, int buflen, int anslen)
{