summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/dietlibc/libcruft/dnscruft4.c
blob: 7a1c52016dff057677cd71a0de64cd690adaaf60 (plain)
1
2
3
4
5
6
7
8
9
10
11
#include <stdlib.h>
#include <sys/types.h>

size_t __dns_buflen=0;
char* __dns_buf=0;

void __dns_makebuf(size_t x);
void __dns_makebuf(size_t x) {
  char* tmp=realloc(__dns_buf,__dns_buflen=x);
  if (tmp) __dns_buf=tmp; else { free(__dns_buf);  __dns_buf=0; }
}