[dpdk-dev,1/2] vhost: move stdbool header file to vhost.h

Message ID 1522216165-19666-2-git-send-email-xiangxia.m.yue@gmail.com (mailing list archive)
State Accepted, archived
Delegated to: Maxime Coquelin
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation fail apply issues

Commit Message

Tonghao Zhang March 28, 2018, 5:49 a.m. UTC
  From: Tonghao Zhang <xiangxia.m.yue@gmail.com>

The vhost.h file uses bool type, but not include stdbool
header file. If other c files include vhost.h directly,
there will be a compile error.

This patch will be used in the next patch.

Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
---
 lib/librte_vhost/socket.c | 1 -
 lib/librte_vhost/vhost.h  | 1 +
 2 files changed, 1 insertion(+), 1 deletion(-)
  

Comments

Maxime Coquelin March 30, 2018, 8:09 a.m. UTC | #1
On 03/28/2018 07:49 AM, xiangxia.m.yue@gmail.com wrote:
> From: Tonghao Zhang <xiangxia.m.yue@gmail.com>
> 
> The vhost.h file uses bool type, but not include stdbool
> header file. If other c files include vhost.h directly,
> there will be a compile error.
> 
> This patch will be used in the next patch.
> 
> Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
> ---
>   lib/librte_vhost/socket.c | 1 -
>   lib/librte_vhost/vhost.h  | 1 +
>   2 files changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Maxime Cqouelin <maxime.coquelin@redhat.com>

Thanks,
Maxime
  

Patch

diff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost/socket.c
index 1352339..95bed78 100644
--- a/lib/librte_vhost/socket.c
+++ b/lib/librte_vhost/socket.c
@@ -4,7 +4,6 @@ 
 
 #include <stdint.h>
 #include <stdio.h>
-#include <stdbool.h>
 #include <limits.h>
 #include <stdlib.h>
 #include <unistd.h>
diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h
index d947bc9..37edb48 100644
--- a/lib/librte_vhost/vhost.h
+++ b/lib/librte_vhost/vhost.h
@@ -6,6 +6,7 @@ 
 #define _VHOST_NET_CDEV_H_
 #include <stdint.h>
 #include <stdio.h>
+#include <stdbool.h>
 #include <sys/types.h>
 #include <sys/queue.h>
 #include <unistd.h>