Skip to content

Commit

Permalink
fix missing ev.h for curvedns build
Browse files Browse the repository at this point in the history
  • Loading branch information
mbhangui committed Oct 3, 2024
1 parent b3ff529 commit 20a88ab
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tinydnssec-x/curvedns-0.88/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ AUTOMAKE_OPTIONS = foreign no-dependencies

CDNSCFLAGS=-Wall -fno-strict-aliasing -O3 $(CPPFLAGS)

DEFS=$(CFLAGS) -g -m64 -O3 -fomit-frame-pointer -funroll-loops $(CDNSCFLAGS) $(EVCFLAGS)
DEFS=@DEFS@ $(CFLAGS) -g -m64 -O3 -fomit-frame-pointer -funroll-loops $(CDNSCFLAGS) $(EVCFLAGS)

bin_PROGRAMS = curvedns
sbin_PROGRAMS = curvedns-keygen
Expand Down
10 changes: 9 additions & 1 deletion tinydnssec-x/curvedns-0.88/cache_hashtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,15 @@
#include <stdint.h>
#include <string.h>

#include <ev.h>
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#ifdef EV_HEADER
#include EV_HEADER /* libev */
#else
#include <ev.h> /* libev */
#endif
#include "crypto_box_curve25519xsalsa20poly1305.h"
#include "debug.h"

Expand Down
16 changes: 16 additions & 0 deletions tinydnssec-x/curvedns-0.88/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,22 @@ esac
# Checks for libraries.
AC_CHECK_LIB(ev, ev_io_start, [AC_SUBST([LIB_EV], ["-lev"]) AC_DEFINE([HAVE_LIBEV], [1],[libevent])],,-lev)
AC_CHECK_LIB(sodium, crypto_box_curve25519xsalsa20poly1305_beforenm, [AC_SUBST([LIB_SODIUM], ["-lsodium"]) AC_DEFINE([HAVE_LIBSODIUM], [1],[sodium library])],,-lsodium)
evdir=""
for f in /usr/include /usr/local/include /opt/local/include
do
if test -f $f/ev.h
then
break
fi
if test -f $f/libev/ev.h
then
evdir="libev"
fi
done
if test -n "$evdir"
then
AC_DEFINE_UNQUOTED(EV_HEADER, "$evdir/ev.h", libev directory)
fi

AC_CONFIG_FILES([Makefile])
AC_OUTPUT
8 changes: 8 additions & 0 deletions tinydnssec-x/curvedns-0.88/event.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,15 @@
#include <stdint.h>
#include <string.h>

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#ifdef EV_HEADER
#include EV_HEADER /* libev */
#else
#include <ev.h>
#endif
#include "ip.h"
#include "cache_hashtable.h"

Expand Down
8 changes: 8 additions & 0 deletions tinydnssec-x/curvedns-0.88/ip.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,15 @@
#include <fcntl.h> /* fcntl() */
#include <netdb.h> /* getaddrinfo() */

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#ifdef EV_HEADER
#include EV_HEADER /* libev */
#else
#include <ev.h> /* libev */
#endif

typedef union {
struct sockaddr sa;
Expand Down

0 comments on commit 20a88ab

Please sign in to comment.