* [PATCH iproute2] dcb: Fix compilation warning about reallocarray
@ 2021-02-22 10:51 Roi Dayan
2021-02-22 11:15 ` Roi Dayan
0 siblings, 1 reply; 4+ messages in thread
From: Roi Dayan @ 2021-02-22 10:51 UTC (permalink / raw)
To: netdev; +Cc: Roi Dayan, Petr Machata, Stephen Hemminger
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 <roid@nvidia.com>
---
dcb/dcb.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/dcb/dcb.c b/dcb/dcb.c
index 6640deef5688..32896c4d5732 100644
--- a/dcb/dcb.c
+++ b/dcb/dcb.c
@@ -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"
--
2.8.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH iproute2] dcb: Fix compilation warning about reallocarray
2021-02-22 10:51 [PATCH iproute2] dcb: Fix compilation warning about reallocarray Roi Dayan
@ 2021-02-22 11:15 ` Roi Dayan
0 siblings, 0 replies; 4+ messages in thread
From: Roi Dayan @ 2021-02-22 11:15 UTC (permalink / raw)
To: netdev; +Cc: Petr Machata, Stephen Hemminger
On 2021-02-22 12:51 PM, Roi Dayan wrote:
> 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 <roid@nvidia.com>
> ---
> dcb/dcb.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/dcb/dcb.c b/dcb/dcb.c
> index 6640deef5688..32896c4d5732 100644
> --- a/dcb/dcb.c
> +++ b/dcb/dcb.c
> @@ -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.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH iproute2] dcb: Fix compilation warning about reallocarray
@ 2021-02-22 12:09 Roi Dayan
2021-02-22 12:11 ` Roi Dayan
0 siblings, 1 reply; 4+ messages in thread
From: Roi Dayan @ 2021-02-22 12:09 UTC (permalink / raw)
To: netdev; +Cc: Roi Dayan, Petr Machata, Stephen Hemminger
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 <roid@nvidia.com>
---
dcb/dcb.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/dcb/dcb.c b/dcb/dcb.c
index 6640deef5688..32896c4d5732 100644
--- a/dcb/dcb.c
+++ b/dcb/dcb.c
@@ -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"
--
2.8.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH iproute2] dcb: Fix compilation warning about reallocarray
2021-02-22 12:09 Roi Dayan
@ 2021-02-22 12:11 ` Roi Dayan
0 siblings, 0 replies; 4+ messages in thread
From: Roi Dayan @ 2021-02-22 12:11 UTC (permalink / raw)
To: netdev; +Cc: Petr Machata, Stephen Hemminger
On 2021-02-22 2:09 PM, Roi Dayan wrote:
> 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 <roid@nvidia.com>
> ---
> dcb/dcb.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/dcb/dcb.c b/dcb/dcb.c
> index 6640deef5688..32896c4d5732 100644
> --- a/dcb/dcb.c
> +++ b/dcb/dcb.c
> @@ -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"
>
sorry for the resend. please ignore. sent v2 of the patch.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-02-22 12:12 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-02-22 10:51 [PATCH iproute2] dcb: Fix compilation warning about reallocarray Roi Dayan
2021-02-22 11:15 ` Roi Dayan
-- strict thread matches above, loose matches on Subject: below --
2021-02-22 12:09 Roi Dayan
2021-02-22 12:11 ` Roi Dayan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).