/*
* mxget.c -- fetch MX records for given DNS name
*
- * Copyright 1996 by Eric S. Raymond
- * All rights reserved.
+ * Copyright 1997 by Eric S. Raymond
* For license terms, see the file COPYING in this directory.
*/
#include "config.h"
#ifdef HAVE_RES_SEARCH
+#include <stdio.h>
#include <netdb.h>
#include <sys/types.h>
#include <netinet/in.h>
static char MXHostBuf[PACKETSZ - HFIXEDSZ];
HEADER *hp;
+ pmx->name = (char *)NULL;
+ pmx->pref = -1;
n = res_search(name,C_IN,T_MX,(unsigned char*)&answer, sizeof(answer));
if (n == -1)
return((struct mxentry *)NULL);