[1/1] smokey: fix build failure

Message ID 20240914131026.1035993-1-dario.binacchi@amarulasolutions.com
State New
Headers show
Series
  • [1/1] smokey: fix build failure
Related show

Commit Message

Dario Binacchi Sept. 14, 2024, 1:10 p.m. UTC
This patch fixes the following building failure raised on bumping Xenomai
to version 3.2.5 in Buildroot:

In file included from helpers.c:29:
../../include/smokey/smokey.h:258:39: error: unknown type name ‘bool’
  258 | int smokey_modprobe(const char *name, bool silent);
      |                                       ^~~~
../../include/smokey/smokey.h:27:1: note: ‘bool’ is defined in header ‘<stdbool.h>’; did you forget to ‘#include <stdbool.h>’?
   26 | #include <xenomai/init.h>
  +++ |+#include <stdbool.h>
   27 |
In file included from init.c:33:
../../include/smokey/smokey.h:258:39: error: unknown type name ‘bool’
  258 | int smokey_modprobe(const char *name, bool silent);
      |                                       ^~~~
../../include/smokey/smokey.h:26:1: note: ‘bool’ is defined in header ‘<stdbool.h>’; did you forget to ‘#include <stdbool.h>’?
   25 | #include <copperplate/clockobj.h>
  +++ |+#include <stdbool.h>
   26 | #include <xenomai/init.h>
helpers.c:299:39: error: unknown type name ‘bool’
  299 | int smokey_modprobe(const char *name, bool silent)
      |                                       ^~~~
helpers.c:30:1: note: ‘bool’ is defined in header ‘<stdbool.h>’; did you forget to ‘#include <stdbool.h>’?
   29 | #include <smokey/smokey.h>
  +++ |+#include <stdbool.h>

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---
 include/smokey/smokey.h | 1 +
 1 file changed, 1 insertion(+)

Comments

'Krzysztof Kozlowski' via Amarula Linux Sept. 16, 2024, 9:30 a.m. UTC | #1
On 14.09.24 15:10, Dario Binacchi wrote:
> This patch fixes the following building failure raised on bumping Xenomai
> to version 3.2.5 in Buildroot:
> 
> In file included from helpers.c:29:
> ../../include/smokey/smokey.h:258:39: error: unknown type name ‘bool’
>   258 | int smokey_modprobe(const char *name, bool silent);
>       |                                       ^~~~
> ../../include/smokey/smokey.h:27:1: note: ‘bool’ is defined in header ‘<stdbool.h>’; did you forget to ‘#include <stdbool.h>’?
>    26 | #include <xenomai/init.h>
>   +++ |+#include <stdbool.h>
>    27 |
> In file included from init.c:33:
> ../../include/smokey/smokey.h:258:39: error: unknown type name ‘bool’
>   258 | int smokey_modprobe(const char *name, bool silent);
>       |                                       ^~~~
> ../../include/smokey/smokey.h:26:1: note: ‘bool’ is defined in header ‘<stdbool.h>’; did you forget to ‘#include <stdbool.h>’?
>    25 | #include <copperplate/clockobj.h>
>   +++ |+#include <stdbool.h>
>    26 | #include <xenomai/init.h>
> helpers.c:299:39: error: unknown type name ‘bool’
>   299 | int smokey_modprobe(const char *name, bool silent)
>       |                                       ^~~~
> helpers.c:30:1: note: ‘bool’ is defined in header ‘<stdbool.h>’; did you forget to ‘#include <stdbool.h>’?
>    29 | #include <smokey/smokey.h>
>   +++ |+#include <stdbool.h>
> 
> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
> ---
>  include/smokey/smokey.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/include/smokey/smokey.h b/include/smokey/smokey.h
> index cf9701966db8..45dd0dcd017b 100644
> --- a/include/smokey/smokey.h
> +++ b/include/smokey/smokey.h
> @@ -19,6 +19,7 @@
>  #define _XENOMAI_SMOKEY_SMOKEY_H
>  
>  #include <stdarg.h>
> +#include <stdbool.h>
>  #include <pthread.h>
>  #include <boilerplate/list.h>
>  #include <boilerplate/libc.h>

Thanks, applied to next, will go into stable-3.2.y later.

Jan

Patch

diff --git a/include/smokey/smokey.h b/include/smokey/smokey.h
index cf9701966db8..45dd0dcd017b 100644
--- a/include/smokey/smokey.h
+++ b/include/smokey/smokey.h
@@ -19,6 +19,7 @@ 
 #define _XENOMAI_SMOKEY_SMOKEY_H
 
 #include <stdarg.h>
+#include <stdbool.h>
 #include <pthread.h>
 #include <boilerplate/list.h>
 #include <boilerplate/libc.h>