#include <netinet/in.h>
#include <poll.h>
+#include <stdio_ext.h>
#include <sys/ioctl.h>
#if HAVE_LIBIDN2
assert(m);
- m->hostname_fd = open("/proc/sys/kernel/hostname", O_RDONLY|O_CLOEXEC|O_NDELAY|O_NOCTTY);
+ m->hostname_fd = open("/proc/sys/kernel/hostname",
+ O_RDONLY|O_CLOEXEC|O_NONBLOCK|O_NOCTTY);
if (m->hostname_fd < 0) {
log_warning_errno(errno, "Failed to watch hostname: %m");
return 0;
if (!f)
return log_oom();
+ (void) __fsetlocking(f, FSETLOCKING_BYCALLER);
+
LIST_FOREACH(scopes, scope, m->dns_scopes)
dns_scope_dump(scope, f);
assert(verdict >= 0);
assert(verdict < _DNSSEC_VERDICT_MAX);
- if (log_get_max_level() >= LOG_DEBUG) {
+ if (DEBUG_LOGGING) {
char s[DNS_RESOURCE_KEY_STRING_MAX];
log_debug("Found verdict for lookup %s: %s",