* Re: [PATCH v4 4/4] eal: remove unneeded includes from a public header
[not found] ` <20220827113222.3951505-5-dmitry.kozliuk@gmail.com>
@ 2022-09-21 11:37 ` David Marchand
0 siblings, 0 replies; only message in thread
From: David Marchand @ 2022-09-21 11:37 UTC (permalink / raw)
To: Dmitry Kozlyuk; +Cc: dev, ci
On Sat, Aug 27, 2022 at 1:33 PM Dmitry Kozlyuk <dmitry.kozliuk@gmail.com> wrote:
>
> Do not include <ctype.h>, <errno.h>, and <stdlib.h> from <rte_common.h>,
> because they are not used by this file.
> Include the needed headers directly from the files that need them.
>
> Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
> ---
[snip]
> examples/vdpa/main.c | 1 +
> examples/vhost/main.c | 2 ++
> examples/vhost/virtio_net.c | 1 +
> examples/vhost_blk/vhost_blk.c | 1 +
We are missing an update of vm_power_manager example:
../../../dpdk/examples/vm_power_manager/parse.c: In function ‘parse_set’:
../../../dpdk/examples/vm_power_manager/parse.c:28:16: error: implicit
declaration of function ‘isblank’
[-Werror=implicit-function-declaration]
28 | while (isblank(*str))
| ^~~~~~~
../../../dpdk/examples/vm_power_manager/parse.c:9:1: note: include
‘<ctype.h>’ or provide a declaration of ‘isblank’
8 | #include "parse.h"
+++ |+#include <ctype.h>
9 |
I am surprised the CI did not catch this issue.
I suspect some dependencies (probably libvirt-devel) are not installed
in CI environments.
The following diff seems enough to fix the issue, can you double check?
diff --git a/examples/vm_power_manager/channel_monitor.c
b/examples/vm_power_manager/channel_monitor.c
index 97b8def7ca..5fef268662 100644
--- a/examples/vm_power_manager/channel_monitor.c
+++ b/examples/vm_power_manager/channel_monitor.c
@@ -2,6 +2,7 @@
* Copyright(c) 2010-2014 Intel Corporation
*/
+#include <ctype.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
diff --git a/examples/vm_power_manager/guest_cli/parse.c
b/examples/vm_power_manager/guest_cli/parse.c
index 528df6d6f1..6ed2d5cb49 100644
--- a/examples/vm_power_manager/guest_cli/parse.c
+++ b/examples/vm_power_manager/guest_cli/parse.c
@@ -3,9 +3,13 @@
* Copyright(c) 2014 6WIND S.A.
*/
+#include <ctype.h>
+#include <errno.h>
#include <stdlib.h>
#include <string.h>
+
#include <rte_log.h>
+
#include "parse.h"
/*
diff --git a/examples/vm_power_manager/parse.c
b/examples/vm_power_manager/parse.c
index 8a8dcf05fe..5467035994 100644
--- a/examples/vm_power_manager/parse.c
+++ b/examples/vm_power_manager/parse.c
@@ -3,8 +3,13 @@
* Copyright(c) 2014 6WIND S.A.
*/
+#include <ctype.h>
+#include <errno.h>
+#include <stdlib.h>
#include <string.h>
+
#include <rte_log.h>
+
#include "parse.h"
/*
--
David Marchand
^ permalink raw reply [flat|nested] only message in thread