diff mbox series

[v1,1/1] libgloss: microblaze: fix read and _write declarations

Message ID 20240513062419.2042278-1-neal.frager@amd.com
State New
Headers show
Series [v1,1/1] libgloss: microblaze: fix read and _write declarations | expand

Commit Message

Neal Frager May 13, 2024, 6:24 a.m. UTC
This patch resolves the following build error which occurs with gcc 14.1.0:
../../.././libgloss/microblaze/linux-outbyte.c: In function 'outbyte':
../../.././libgloss/microblaze/linux-outbyte.c:3:9: error: implicit declaration of function '_write' [-Wimplicit-function-declaration]
    3 |         _write(1, &c, 1);

Signed-off-by: Neal Frager <neal.frager@amd.com>
---
 libgloss/microblaze/linux-inbyte.c  | 2 ++
 libgloss/microblaze/linux-outbyte.c | 2 ++
 2 files changed, 4 insertions(+)

Comments

Jeff Johnston May 14, 2024, 6:28 p.m. UTC | #1
Patch applied.  Thanks.

-- Jeff J.

On Mon, May 13, 2024 at 2:24 AM Neal Frager <neal.frager@amd.com> wrote:

> This patch resolves the following build error which occurs with gcc 14.1.0:
> ../../.././libgloss/microblaze/linux-outbyte.c: In function 'outbyte':
> ../../.././libgloss/microblaze/linux-outbyte.c:3:9: error: implicit
> declaration of function '_write' [-Wimplicit-function-declaration]
>     3 |         _write(1, &c, 1);
>
> Signed-off-by: Neal Frager <neal.frager@amd.com>
> ---
>  libgloss/microblaze/linux-inbyte.c  | 2 ++
>  libgloss/microblaze/linux-outbyte.c | 2 ++
>  2 files changed, 4 insertions(+)
>
> diff --git a/libgloss/microblaze/linux-inbyte.c
> b/libgloss/microblaze/linux-inbyte.c
> index 58fdf1957..2f8d33871 100644
> --- a/libgloss/microblaze/linux-inbyte.c
> +++ b/libgloss/microblaze/linux-inbyte.c
> @@ -1,3 +1,5 @@
> +extern int read (int, char *, int);
> +
>  int inbyte(void)
>  {
>         char ch = 0;
> diff --git a/libgloss/microblaze/linux-outbyte.c
> b/libgloss/microblaze/linux-outbyte.c
> index 9d7bc4890..46de511f6 100644
> --- a/libgloss/microblaze/linux-outbyte.c
> +++ b/libgloss/microblaze/linux-outbyte.c
> @@ -1,3 +1,5 @@
> +extern int _write (int, char *, int);
> +
>  void outbyte (unsigned char c)
>  {
>         _write(1, &c, 1);
> --
> 2.25.1
>
>
diff mbox series

Patch

diff --git a/libgloss/microblaze/linux-inbyte.c b/libgloss/microblaze/linux-inbyte.c
index 58fdf1957..2f8d33871 100644
--- a/libgloss/microblaze/linux-inbyte.c
+++ b/libgloss/microblaze/linux-inbyte.c
@@ -1,3 +1,5 @@ 
+extern int read (int, char *, int);
+
 int inbyte(void)
 {
 	char ch = 0;
diff --git a/libgloss/microblaze/linux-outbyte.c b/libgloss/microblaze/linux-outbyte.c
index 9d7bc4890..46de511f6 100644
--- a/libgloss/microblaze/linux-outbyte.c
+++ b/libgloss/microblaze/linux-outbyte.c
@@ -1,3 +1,5 @@ 
+extern int _write (int, char *, int);
+
 void outbyte (unsigned char c)
 {
 	_write(1, &c, 1);