Fixes for building with CRL monitor when not linux, OS X or FreeBSD and --enable-distro set. Cleanup of the crl.c HAVE_CRL_MONITOR checks for OS and make sure if StopMonitor preprocessor is defined the function will also be defined.

This commit is contained in:
David Garske
2016-12-07 07:07:27 -08:00
committed by jrblixt
parent 2f3ec778bd
commit cb0cc92ff2
2 changed files with 13 additions and 9 deletions

View File

@ -1782,7 +1782,12 @@ then
*linux* | *darwin* | *freebsd*)
AM_CFLAGS="$AM_CFLAGS -DHAVE_CRL_MONITOR" ;;
*)
AC_MSG_ERROR([crl monitor only allowed on linux, OS X, or freebsd]) ;;
if test "x$ENABLED_DISTRO" = "xyes" ; then
ENABLED_CRL_MONITOR="no"
else
AC_MSG_ERROR( [crl monitor only allowed on linux, OS X, or freebsd])
fi
break;;
esac
fi
@ -2232,7 +2237,7 @@ then
AM_CFLAGS="$AM_CFLAGS -DHAVE_OCSP"
AM_CONDITIONAL([BUILD_OCSP], [test "x$ENABLED_OCSP" = "xyes"])
fi
if test "x$ENABLED_CRL_MONITOR" = "xno"
if test "x$ENABLED_CRL_MONITOR" = "xno" && test "x$ENABLED_DISTRO" = "xno"
then
ENABLED_CRL_MONITOR="yes"
AM_CFLAGS="$AM_CFLAGS -DHAVE_CRL_MONITOR"

View File

@ -42,8 +42,12 @@
#include <string.h>
#ifdef HAVE_CRL_MONITOR
static int StopMonitor(int mfd);
#endif
#if (defined(__MACH__) || defined(__FreeBSD__) || defined(__linux__))
static int StopMonitor(int mfd);
#else
#error "CRL monitor only currently supported on linux or mach"
#endif
#endif /* HAVE_CRL_MONITOR */
/* Initialize CRL members */
@ -718,11 +722,6 @@ static void* DoMonitor(void* arg)
return NULL;
}
#else
#error "CRL monitor only currently supported on linux or mach"
#endif /* MACH or linux */