gethostbyname_r.c 314 字节
Newer Older
R
Rich Felker 已提交
1 2 3 4
#define _GNU_SOURCE

#include <sys/socket.h>
#include <netdb.h>
W
w00349915 已提交
5
#include <unsupported_api.h>
R
Rich Felker 已提交
6 7 8 9 10

int gethostbyname_r(const char *name,
	struct hostent *h, char *buf, size_t buflen,
	struct hostent **res, int *err)
{
W
w00349915 已提交
11
	unsupported_api(__FUNCTION__);
R
Rich Felker 已提交
12 13
	return gethostbyname2_r(name, AF_INET, h, buf, buflen, res, err);
}