xref: /OK3568_Linux_fs/buildroot/package/acpid/0002-add-missing-defines.patch (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1Add missing MSG_CMSG_CLOEXEC
2
3Unpatched uClibc toolchains, even using the latest 0.9.33.2, do not
4have the MSG_CMSG_CLOEXEC definition. Even though the Buildroot
5internal toolchain backend has a uClibc patch to provide it, it
6doesn't apply to external toolchains. This patch provides the
7definition of MSG_CMSG_CLOEXEC.
8
9Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
10
11Index: b/libnetlink.h
12===================================================================
13--- a/libnetlink.h
14+++ b/libnetlink.h
15@@ -7,6 +7,10 @@
16 #include <linux/netlink.h>
17 #include <linux/rtnetlink.h>
18
19+#ifndef MSG_CMSG_CLOEXEC
20+#define MSG_CMSG_CLOEXEC 0x40000000
21+#endif
22+
23 struct rtnl_handle
24 {
25 	int			fd;
26Index: b/kacpimon/libnetlink.h
27===================================================================
28--- a/kacpimon/libnetlink.h
29+++ b/kacpimon/libnetlink.h
30@@ -7,6 +7,10 @@
31 #include <linux/netlink.h>
32 #include <linux/rtnetlink.h>
33
34+#ifndef MSG_CMSG_CLOEXEC
35+#define MSG_CMSG_CLOEXEC 0x40000000
36+#endif
37+
38 struct rtnl_handle
39 {
40 	int			fd;
41