Author: Dharanendiran <dharanendiran@timesys.com>
Date: Wed, 4 Mar 2020 16:17:23 +0530

To fix the below error:
libnetlink.c: In function 'rtnl_dump_filter':
libnetlink.c:174:34: error: 'MSG_CMSG_CLOEXEC' undeclared (first use in this function)
   status = TEMP_FAILURE_RETRY ( recvmsg(rth->fd, &msg, MSG_CMSG_CLOEXEC) );

---
 kacpimon/libnetlink.h | 4 ++++
 libnetlink.h          | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/kacpimon/libnetlink.h b/kacpimon/libnetlink.h
index 0c61896..eba12af 100644
--- a/kacpimon/libnetlink.h
+++ b/kacpimon/libnetlink.h
@@ -9,6 +9,10 @@
 
 #include "libc_compat.h"
 
+#ifndef MSG_CMSG_CLOEXEC
+#define MSG_CMSG_CLOEXEC 0x40000000
+#endif
+
 struct rtnl_handle
 {
 	int			fd;
diff --git a/libnetlink.h b/libnetlink.h
index 8f9cb5e..d2ddc3f 100644
--- a/libnetlink.h
+++ b/libnetlink.h
@@ -7,6 +7,10 @@
 #include <linux/netlink.h>
 #include <linux/rtnetlink.h>
 
+#ifndef MSG_CMSG_CLOEXEC
+#define MSG_CMSG_CLOEXEC 0x40000000
+#endif
+
 struct rtnl_handle
 {
 	int			fd;
-- 
1.9.1

