fh_key_file: fix missing string.h inclusion
Subsystems (2)
PATCH v2 1/3 fh_key_file: fix missing string.h inclusion
Add #include <string.h> to fix build failure.
---V1->V2:
* no changes
--- support/nfs/fh_key_file.c | 1 + 1 file changed, 1 insertion(+)
support/nfs/fh_key_file.c +1 -0
@@ -26,6 +26,7 @@#include <sys/types.h> #include <unistd.h> #include <errno.h> +#include <string.h> #include <uuid/uuid.h> #include "nfslib.h"
Signature · 1 line
2.47.3
PATCH v2 2/3 Introduce compat.h file to deal with old Linux api and fix build failure due to missing NETLINK_EXT_ACK
In "compat.h" check if NETLINK_EXT_ACK exists, otherwise define it to fix build failure and where at the moment <linux/netlink.h> is included let's include "compat.h"
---V1->V2:
* include "compat.h" in place of <linux/netlink.h>
--- support/export/cache.c | 2 +- support/export/cache_flush.c | 2 ++ support/include/compat.h | 10 ++++++++++ utils/nfsdctl/nfsdctl.c | 1 + 4 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 support/include/compat.h
support/export/cache.c +1 -1
@@ -40,7 +40,7 @@#include <netlink/genl/ctrl.h> #include <netlink/msg.h> #include <netlink/attr.h> -#include <linux/netlink.h> +#include "compat.h" #ifdef USE_SYSTEM_NFSD_NETLINK_H #include <linux/nfsd_netlink.h>
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
@@ -26,6 +26,7 @@#include <netlink/msg.h> #include <netlink/attr.h> #include <linux/netlink.h> +#include "compat.h" #include <readline/readline.h> #include <readline/history.h>
Signature · 1 line
2.47.3
Re: [PATCH v2 2/3] Introduce compat.h file to deal with old Linux api and fix build failure due to missing NETLINK_EXT_ACK
Quoted 5 lines · Giulio Benetti
In "
compat.h" check ifNETLINK_EXT_ACKexists, otherwise define it to fix build failure and where at the moment <linux/netlink.h> is included let's include "compat.h"Signed-off-by Giulio Benetti <[email protected]>
Committed (tag: nfs-utils-2-9-2-rc3)
steved
Quoted 65 lines
---
V1->V2:
* include "compat.h" in place of <linux/netlink.h>--- support/export/cache.c | 2 +- support/export/cache_flush.c | 2 ++ support/include/compat.h | 10 ++++++++++ utils/nfsdctl/nfsdctl.c | 1 + 4 files changed, 14 insertions(+), 1 deletion(-)create mode 100644
support/include/compat.hsupport/export/cache.c +1
-1@@ -40,7 +40,7 @@#include <netlink/genl/ctrl.h> #include <netlink/msg.h> #include <netlink/attr.h> -#include <linux/netlink.h> +#include "compat.h" #ifdef USE_SYSTEM_NFSD_NETLINK_H #include <linux/nfsd_netlink.h> 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@@ -26,6 +26,7 @@#include <netlink/msg.h> #include <netlink/attr.h> #include <linux/netlink.h> +#include "compat.h" #include <readline/readline.h> #include <readline/history.h>
PATCH v2 3/3 support/backend_sqlite.c: fix getrandom() fallback
In reply to Giulio BenettiIn old Linux/Glibc versions __NR_getrandom is defined in <sys/random.h> so let's add it to fix build failure.
---V1->V2
* added patch
--- support/reexport/backend_sqlite.c | 2 ++ 1 file changed, 2 insertions(+)
support/reexport/backend_sqlite.c +2 -0
@@ -9,6 +9,8 @@#include <string.h> #include <unistd.h> +#include <sys/syscall.h> +#ifdef HAVE_GETRANDOM # include <sys/random.h> # if !defined(SYS_getrandom) && defined(__NR_getrandom)
Signature · 1 line
2.47.3
Re: [PATCH v2 3/3] support/backend_sqlite.c: fix getrandom() fallback
Quoted 4 lines · Giulio Benetti
In old Linux/Glibc versions
__NR_getrandomis defined in <sys/random.h> so let's add it to fix build failure.Signed-off-by Giulio Benetti <[email protected]>
Committed (tag: nfs-utils-2-9-2-rc3)
steved
Quoted 20 lines
---
V1->V2
* added patch--- support/reexport/backend_sqlite.c | 2 ++ 1 file changed, 2 insertions(+)support/reexport/backend_sqlite.c +2
-0@@ -9,6 +9,8 @@#include <string.h> #include <unistd.h> +#include <sys/syscall.h> +#ifdef HAVE_GETRANDOM # include <sys/random.h> # if !defined(SYS_getrandom) && defined(__NR_getrandom)
Quoted 3 lines · Giulio Benetti
Add #include <
string.h> to fix build failure.Signed-off-by Giulio Benetti <[email protected]>
Committed (tag: nfs-utils-2-9-2-rc3)
steved
Quoted 19 lines
---
V1->V2:
* no changes--- support/nfs/fh_key_file.c | 1 + 1 file changed, 1 insertion(+)support/nfs/fh_key_file.c +1
-0@@ -26,6 +26,7 @@#include <sys/types.h> #include <unistd.h> #include <errno.h> +#include <string.h> #include <uuid/uuid.h> #include "nfslib.h"