source: azure_iot_hub/trunk/musl-1.1.18/src/network/res_querydomain.c@ 389

Last change on this file since 389 was 389, checked in by coas-nagasima, 5 years ago

ビルドが通るよう更新

  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/x-csrc;charset=UTF-8
File size: 390 bytes
Line 
1#include <resolv.h>
2#include <string.h>
3
4int res_querydomain(const char *name, const char *domain, int class, int type, unsigned char *dest, int len)
5{
6 char tmp[255];
7 size_t nl = strnlen(name, 255);
8 size_t dl = strnlen(domain, 255);
9 if (nl+dl+1 > 254) return -1;
10 memcpy(tmp, name, nl);
11 tmp[nl] = '.';
12 memcpy(tmp+nl+1, domain, dl+1);
13 return res_query(tmp, class, type, dest, len);
14}
Note: See TracBrowser for help on using the repository browser.