commit - cfe57149140baac9bfd1f900a6e6e425e41b6900
commit + a41ba086314a97211e1856fc968a8d18b11df953
blob - 0adf97437ca6d672a99314a848d308eae7039d08
blob + f1cccc911d3f8f5f2ef4786a26bc9db507fa7451
--- configure
+++ configure
HAVE_GETEXECNAME=
HAVE_GETPROGNAME=
HAVE_LIBEVENT=
-HAVE_LIBEVENT2=0 # may not be checked
+HAVE_LIBEVENT2=
HAVE_PLEDGE=
HAVE_PROGRAM_INVOCATION_SHORT_NAME=
HAVE_PR_SET_NAME=
runtest unveil UNVEIL || true
runtest __progname __PROGNAME || true
-if [ "${HAVE_LIBEVENT}" -eq 0 -a "${HAVE_LIBEVENT2}" -eq 0 ]; then
+if [ "${HAVE_LIBEVENT}" -eq 0 -a "${HAVE_LIBEVENT2:-0}" -eq 0 ]; then
echo "Fatal: missing libevent" 1>&2
echo "Fatal: missing libevent" 1>&3
exit 1
echo
fi
-if [ ${HAVE_LIBEVENT2} -eq 1 ]; then
+if [ ${HAVE_LIBEVENT2:-0} -eq 1 ]; then
cat <<EOF
#include <event2/event.h>
#include <event2/event_compat.h>
#if !HAVE_GETPROGNAME
extern const char *getprogname(void);
+#endif
+
+#if !HAVE_PLEDGE
+# define pledge(a, b) (0)
#endif
#if !HAVE_STRLCAT
extern long long strtonum(const char *, long long, long long, const char **);
#endif
+#if !HAVE_UNVEIL
+# define unveil(a, b) (0)
+#endif
+
#ifndef __dead
# define __dead __attribute__((noreturn))
#endif