speakup: include types.h so u_char is a known type

Message ID 20221025101828.1626490-1-ecurtin@redhat.com
State New
Headers
Series speakup: include types.h so u_char is a known type |

Commit Message

Eric Curtin Oct. 25, 2022, 10:18 a.m. UTC
  Fixes build of utils.h header file, occurred when building kernel on
postmarketOS on Lenovo Duet Chromebook.

  drivers/accessibility/speakup/utils.h:57:9: error: unknown type name 'u_char'; did you mean 'char'?
     57 |         u_char *pn = (u_char *)name;
        |         ^~~~~~
        |         char

Fixes: 6a5c94d92699 ("speakup: Generate speakupmap.h automatically")
Signed-off-by: Eric Curtin <ecurtin@redhat.com>
---
 drivers/accessibility/speakup/utils.h | 1 +
 1 file changed, 1 insertion(+)
  

Comments

Samuel Thibault Oct. 25, 2022, 10:48 a.m. UTC | #1
Hello,

Eric Curtin, le mar. 25 oct. 2022 11:18:24 +0100, a ecrit:
> Fixes build of utils.h header file, occurred when building kernel on
> postmarketOS on Lenovo Duet Chromebook.
> 
>   drivers/accessibility/speakup/utils.h:57:9: error: unknown type name 'u_char'; did you mean 'char'?
>      57 |         u_char *pn = (u_char *)name;
>         |         ^~~~~~
>         |         char
> 

There is already a patch pending commit that just replaces it with
unsigned char.

(see
Subject: [PATCH] speakup: replace utils' u_char with unsigned char
)

Samuel
  
Eric Curtin Oct. 25, 2022, 11:08 a.m. UTC | #2
On Tue, 25 Oct 2022 at 11:54, Samuel Thibault
<samuel.thibault@ens-lyon.org> wrote:
>
> Hello,
>
> Eric Curtin, le mar. 25 oct. 2022 11:18:24 +0100, a ecrit:
> > Fixes build of utils.h header file, occurred when building kernel on
> > postmarketOS on Lenovo Duet Chromebook.
> >
> >   drivers/accessibility/speakup/utils.h:57:9: error: unknown type name 'u_char'; did you mean 'char'?
> >      57 |         u_char *pn = (u_char *)name;
> >         |         ^~~~~~
> >         |         char
> >
>
> There is already a patch pending commit that just replaces it with
> unsigned char.

Sorry I missed that. that works for me :)

>
> (see
> Subject: [PATCH] speakup: replace utils' u_char with unsigned char
> )
>
> Samuel
>
  

Patch

diff --git a/drivers/accessibility/speakup/utils.h b/drivers/accessibility/speakup/utils.h
index 4bf2ee8ac246..f6fe477ecb28 100644
--- a/drivers/accessibility/speakup/utils.h
+++ b/drivers/accessibility/speakup/utils.h
@@ -7,6 +7,7 @@ 
  */
 
 #include <stdio.h>
+#include <sys/types.h>
 
 #define MAXKEYS 512
 #define MAXKEYVAL 160