Author: Dharanendiran <dharanendiran@timesys.com>
Date: Thu, 28 Jan 2021 14:09:32 +0530

Error log-1:
sys-linux.c: In function 'append_peer_ipv6_address':
sys-linux.c:2848:20: error: 'SOL_NETLINK' undeclared (first use in this function)
     setsockopt(fd, SOL_NETLINK, NETLINK_CAP_ACK, &one, sizeof(one));
                    ^~~~~~~~~~~
sys-linux.c:2848:20: note: each undeclared identifier is reported only once for each function it appears in
<builtin>: recipe for target 'sys-linux.o' failed


Error log-2:
sys-linux.c:2852:33: error: 'NETLINK_CAP_ACK' undeclared (first use in this function)
     setsockopt(fd, SOL_NETLINK, NETLINK_CAP_ACK, &one, sizeof(one));

---
 pppd/sys-linux.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/pppd/sys-linux.c b/pppd/sys-linux.c
index 85033d9..4806fd6 100644
--- a/pppd/sys-linux.c
+++ b/pppd/sys-linux.c
@@ -93,6 +93,14 @@
 #include <termios.h>
 #include <unistd.h>
 
+#ifndef SOL_NETLINK
+#define SOL_NETLINK     270
+#endif
+
+#ifndef NETLINK_CAP_ACK
+#define NETLINK_CAP_ACK 10
+#endif
+
 /* This is in netdevice.h. However, this compile will fail miserably if
    you attempt to include netdevice.h because it has so many references
    to __memcpy functions which it should not attempt to do. So, since I
-- 
1.9.1

