chiark / gitweb /
Remove support for auto-spawning VTs
[elogind.git] / src / libelogind / sd-rtnl / rtnl-message.c
index c938471fe30a957ec54427666a1aecf9b17c6872..9dcf7df55972fbc09a01927ca366f357960c96d9 100644 (file)
@@ -24,6 +24,7 @@
 #include <unistd.h>
 
 #include "util.h"
+#include "formats-util.h"
 #include "refcnt.h"
 #include "missing.h"
 
@@ -44,7 +45,7 @@ static int message_new_empty(sd_rtnl *rtnl, sd_rtnl_message **ret) {
 
         /* Note that 'rtnl' is currently unused, if we start using it internally
            we must take care to avoid problems due to mutual references between
-           busses and their queued messages. See sd-bus.
+           buses and their queued messages. See sd-bus.
          */
 
         m = new0(sd_rtnl_message, 1);
@@ -1441,7 +1442,7 @@ static int socket_recv_message(int fd, struct iovec *iov, uint32_t *_group, bool
                 return (errno == EAGAIN || errno == EINTR) ? 0 : -errno;
         }
 
-        for (cmsg = CMSG_FIRSTHDR(&msg); cmsg; cmsg = CMSG_NXTHDR(&msg, cmsg)) {
+        CMSG_FOREACH(cmsg, &msg) {
                 if (cmsg->cmsg_level == SOL_SOCKET &&
                     cmsg->cmsg_type == SCM_CREDENTIALS &&
                     cmsg->cmsg_len == CMSG_LEN(sizeof(struct ucred))) {