]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/basic/socket-util.h
socket-util: move CMSG_FOREACH() from macro.h to socket-util.h
[thirdparty/systemd.git] / src / basic / socket-util.h
index 8b5410b39103d5f048111af4361afbdb4903ee21..c60f2556af840e86806adbea785ce7a86a30d239 100644 (file)
@@ -127,3 +127,6 @@ int getpeersec(int fd, char **ret);
 
 int send_one_fd(int transport_fd, int fd, int flags);
 int receive_one_fd(int transport_fd, int flags);
+
+#define CMSG_FOREACH(cmsg, mh)                                          \
+        for ((cmsg) = CMSG_FIRSTHDR(mh); (cmsg); (cmsg) = CMSG_NXTHDR((mh), (cmsg)))