diff --git a/configure b/configure index 5c4febf..691d08e 100755 --- a/configure +++ b/configure @@ -804,10 +804,12 @@ if [ $feat_scfilter = "1" ] && [ $try_seccomp = "1" ] && \ 'seccomp_init(SCMP_ACT_KILL);' then add_def FEAT_SCFILTER - # NAME2IPADDRESS shouldn't be enabled with other operations as the helper - # process works on one request at the time and the async resolver could - # block the main thread - priv_ops="NAME2IPADDRESS RELOADDNS" + if [ $feat_ntp = "1" ]; then + # NAME2IPADDRESS shouldn't be enabled together with a privops operation + # used by the main thread as the helper process works on one request at + # a time and the async resolver would block the main thread + priv_ops="NAME2IPADDRESS RELOADDNS" + fi EXTRA_LIBS="$EXTRA_LIBS -lseccomp" fi diff --git a/stubs.c b/stubs.c index 36f20f7..ae41a83 100644 --- a/stubs.c +++ b/stubs.c @@ -49,7 +49,7 @@ #include "sched.h" #include "util.h" -#ifndef FEAT_ASYNCDNS +#if defined(FEAT_NTP) && !defined(FEAT_ASYNCDNS) /* This is a blocking implementation used when asynchronous resolving is not available */ diff --git a/test/compilation/001-features b/test/compilation/001-features index 7b92ad5..9bd340f 100755 --- a/test/compilation/001-features +++ b/test/compilation/001-features @@ -17,12 +17,15 @@ for opts in \ "--disable-rtc" \ "--disable-sechash" \ "--disable-cmdmon" \ + "--disable-cmdmon --enable-scfilter" \ "--disable-ntp" \ + "--disable-ntp --enable-scfilter" \ "--disable-nts" \ "--disable-refclock" \ "--disable-timestamping" \ "--disable-timestamping --disable-ntp" \ "--disable-cmdmon --disable-ntp" \ + "--disable-cmdmon --disable-ntp --enable-scfilter" \ "--disable-cmdmon --disable-refclock" \ "--disable-cmdmon --disable-ntp --disable-refclock" do