Introduce compat.h file to deal with old Linux api and fix build failure due to missing NETLINK_EXT_ACK
Subsystems (2)
PATCH 1/1 Introduce compat.h file to deal with old Linux api and fix build failure due to missing NETLINK_EXT_ACK
Check if NETLINK_EXT_ACK exists, otherwise define it to fix build failure.
Signed-off-by Giulio Benetti <[email protected]>
--- support/export/cache.c | 2 ++ support/export/cache_flush.c | 2 ++ support/include/compat.h | 10 ++++++++++ utils/nfsdctl/nfsdctl.c | 1 + 4 files changed, 15 insertions(+) create mode 100644 support/include/compat.h
support/export/cache.c +2 -0
@@ -58,6 +58,8 @@#include "blkid/blkid.h" #endif +#include "compat.h" +enum nfsd_fsid {FSID_DEV =0 ,FSID_NUM ,
support/export/cache_flush.c +2 -0
@@ -38,6 +38,8 @@ extern int no_netlink;#include "sunrpc_netlink.h" #endif +#include "compat.h" +static int nl_send_flush (struct nl_sock *sock,int family,int cmd) {struct nl_msg *msg;
support/include/compat.h new file +10 -0
@@ -0,0 +1,10 @@ +#ifndef COMPAT_H +#define COMPAT_H + +#include <linux/netlink.h> + +#ifndef NETLINK_EXT_ACK +#define NETLINK_EXT_ACK 11 +#endif + +#endif /* COMPAT_H */
utils/nfsdctl/nfsdctl.c +1 -0
@@ -45,6 +45,7 @@#include "nfslib.h" #include "nfsdctl.h" +#include "compat.h" #include "conffile.h" #include "xlog.h"
Signature · 1 line
2.47.3