$(RADCLIENT_BUILDDIR)/Makefile: $(RADCLIENT_DIR)
mkdir -p $(RADCLIENT_BUILDDIR)
- cd $(RADCLIENT_BUILDDIR) && $(DEFAULT_VARS) $(RADCLIENT_DIR)/configure $(DEFAULT_ARGS) --srcdir=$(RADCLIENT_DIR)
-+ cd $(RADCLIENT_BUILDDIR) && patch -p1 < ../../src/mod/event_handlers/mod_radius_cdr/freeradius-client-1.1.6-configure-in.diff && autoreconf -v -f -i -s && $(DEFAULT_VARS) CFLAGS="${CFLAGS} -Wno-cpp" $(RADCLIENT_DIR)/configure $(DEFAULT_ARGS) --srcdir=$(RADCLIENT_DIR)
++ cd $(RADCLIENT_BUILDDIR) && patch -N -p1 < ../../src/mod/event_handlers/mod_radius_cdr/freeradius-client-1.1.6-configure-in.diff || echo "Assuming patch was applied previously" && autoreconf -v -f -i -s && $(DEFAULT_VARS) CFLAGS="${CFLAGS} -Wno-cpp" $(RADCLIENT_DIR)/configure $(DEFAULT_ARGS) --srcdir=$(RADCLIENT_DIR)
$(TOUCH_TARGET)
$(RADCLIENT_LA): $(RADCLIENT_BUILDDIR)/Makefile
+@@ -234,13 +234,11 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([
+ enable_getrandom=getentropy],
+ [AC_MSG_RESULT(no)])
-+
++
+-AC_MSG_CHECKING([for /dev/urandom])
+-if test -c /dev/urandom
+-then
++if test $ac_cv_dev_urandom = yes; then
++ AC_DEFINE(HAVE_DEV_URANDOM)
+ fi
-+
++
+ AC_ARG_WITH([nettle], [AS_HELP_STRING([--with-nettle],