#include "dirent-util.h"
#include "dns-domain.h"
#include "fd-util.h"
-#include "fileio-label.h"
+#include "fileio.h"
#include "hostname-util.h"
#include "io-util.h"
#include "netlink-util.h"
#include "random-util.h"
#include "resolved-bus.h"
#include "resolved-conf.h"
-#include "resolved-dnssd.h"
#include "resolved-dns-stub.h"
+#include "resolved-dnssd.h"
#include "resolved-etc-hosts.h"
#include "resolved-llmnr.h"
#include "resolved-manager.h"
if (r < 0)
return r;
- iov = (struct iovec) {
- .iov_base = DNS_PACKET_DATA(p),
- iov.iov_len = p->allocated,
- };
+ iov = IOVEC_MAKE(DNS_PACKET_DATA(p), p->allocated);
l = recvmsg(fd, &mh, 0);
- if (l == 0)
- return 0;
if (l < 0) {
if (IN_SET(errno, EAGAIN, EINTR))
return 0;
return -errno;
}
+ if (l == 0)
+ return 0;
assert(!(mh.msg_flags & MSG_CTRUNC));
assert(!(mh.msg_flags & MSG_TRUNC));
assert(port > 0);
assert(p);
- iov = (struct iovec) {
- .iov_base = DNS_PACKET_DATA(p),
- .iov_len = p->size,
- };
+ iov = IOVEC_MAKE(DNS_PACKET_DATA(p), p->size);
sa = (union sockaddr_union) {
.in.sin_family = AF_INET,
assert(port > 0);
assert(p);
- iov = (struct iovec) {
- .iov_base = DNS_PACKET_DATA(p),
- .iov_len = p->size,
- };
+ iov = IOVEC_MAKE(DNS_PACKET_DATA(p), p->size);
sa = (union sockaddr_union) {
.in6.sin6_family = AF_INET6,