dcb: Fix compilation warning about reallocarray
Subsystems (2)
PATCH 1/1 dcb: Fix compilation warning about reallocarray
To use reallocarray we need to add bsd/stdlib.h.
dcb_app.c: In function ‘dcb_app_table_push’:
dcb_app.c:68:25: warning: implicit declaration of function ‘reallocarray’; did you mean ‘realloc’?
Fixes 8e9bed1493f5 ("dcb: Add a subtool for the DCB APP object")
Signed-off-by Roi Dayan <[email protected]>
--- dcb/dcb.c | 1 + 1 file changed, 1 insertion(+)
dcb/dcb.c +1 -0
@@ -5,6 +5,7 @@#include <linux/dcbnl.h> #include <libmnl/libmnl.h> #include <getopt.h> +#include <bsd/stdlib.h> #include "dcb.h" #include "mnl_utils.h"
Signature · 1 line
2.8.0
Quoted 17 lines · Roi Dayan
To use reallocarray we need to add
bsd/stdlib.h.
dcb_app.c: In function ‘dcb_app_table_push’:
dcb_app.c:68:25: warning: implicit declaration of function ‘reallocarray’; did you mean ‘realloc’?Fixes 8e9bed1493f5 ("dcb: Add a subtool for the DCB APP object")Signed-off-by Roi Dayan <[email protected]>--- dcb/dcb.c | 1 + 1 file changed, 1 insertion(+)dcb/dcb.c +0
-0
dcb/dcb.c line 11
Quoted 7 lines
dcb/dcb.c +1
-0@@ -5,6 +5,7 @@#include <linux/dcbnl.h> #include <libmnl/libmnl.h> #include <getopt.h> +#include <bsd/stdlib.h> #include "dcb.h" #include "mnl_utils.h"
It seems I need this include in old centos distro but not in fedora 27 for example as it is part of glibc. don't merge this please.