lib_LTLIBRARIES = libevent.la
libevent_la_SOURCES = event.c buffer.c evbuffer.c log.c event_tagging.c \
- http.c evhttp.h http-internal.h
+ http.c evhttp.h http-internal.h evdns.c evdns.h
libevent_la_LIBADD = @LTLIBOBJS@
libevent_la_LDFLAGS = -release @VERSION@ -version-info 1:3:0
AC_HEADER_TIME
dnl Checks for library functions.
-AC_CHECK_FUNCS(gettimeofday vasprintf fcntl clock_gettime)
+AC_CHECK_FUNCS(gettimeofday vasprintf fcntl clock_gettime strtok_r)
AC_REPLACE_FUNCS(strlcpy)
+if test "x$ac_cv_func_clock_gettime" = "xyes"; then
+ AC_DEFINE(DNS_USE_CPU_CLOCK_FOR_ID, 1, [Define if clock_gettime is available in libc])
+else
+ AC_DEFINE(DNS_USE_GETTIMEOFDAY_FOR_ID, 1, [Define is no secure id variant is available])
+fi
+
AC_MSG_CHECKING(for F_SETFD in fcntl.h)
AC_EGREP_CPP(yes,
[
* with the next probe.
*/
-#include "eventdns.h"
-#include "eventdns_tor.h"
+#include <sys/types.h>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
//#define NDEBUG
#ifndef DNS_USE_CPU_CLOCK_FOR_ID
#define _FORTIFY_SOURCE 3
#include <string.h>
-#include <sys/types.h>
#include <fcntl.h>
#include <sys/socket.h>
#include <sys/time.h>
#include <stdio.h>
#include <stdarg.h>
+#include "evdns.h"
+
#ifndef HOST_NAME_MAX
#define HOST_NAME_MAX 255
#endif
#define u16 uint16_t
#define u8 uint8_t
-#include "eventdns.h"
-
#define MAX_ADDRS 4 // maximum number of addresses from a single packet
// which we bother recording
#ifdef DNS_USE_CPU_CLOCK_FOR_ID
struct timespec ts;
const u16 trans_id = ts.tv_nsec & 0xffff;
- if (clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &ts)) abort();
+ if (clock_gettime(CLOCK_PROF, &ts)) abort();
#endif
#ifdef DNS_USE_GETTIMEOFDAY_FOR_ID