Skip to content

Commit

Permalink
Use a more reasonable prototype for res_query.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Dec 26, 2018
1 parent e182dce commit 9811ad8
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions dns.c
Expand Up @@ -5,8 +5,10 @@
#include <arpa/nameser.h>
#include <resolv.h>
#include <errno.h>
extern int res_query();
extern int res_search();
extern int res_query(const char *dname, int class, int type,
unsigned char *answer, int anslen);
extern int res_search(const char *dname, int class, int type,
unsigned char *answer, int anslen);
#include "ip.h"
#include "ipalloc.h"
#include "fmt.h"
Expand All @@ -33,7 +35,8 @@ unsigned short pref;

static stralloc glue = {0};

static int (*lookup)() = res_query;
static int (*lookup)(const char *dname, int class, int type,
unsigned char *answer, int anslen) = res_query;

static int resolve(domain,type)
stralloc *domain;
Expand Down

0 comments on commit 9811ad8

Please sign in to comment.