[PATCH] [gdb/testsuite] Fix compilation error with musl in gdb/testsuite/gdb.base/fileio.c

Joel Brobecker brobecker@adacore.com
Mon Feb 3 10:37:00 GMT 2020


> Musl is giving warnings about these includes in this way:
> warning: #warning redirecting incorrect #include <sys/errno.h> to <errno.h>
> warning: #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h>
> 
> gdb/testsuite/Changelog:
> 
> 	* gdb.base/fileio.c: Remove #include of <sys/errno.h>.
> 	Replace #include of <sys/fcntl.h> by <fcntl.h>.

Thank you; pushed to master, under the "tiny change" rule.

> ---
>  gdb/testsuite/ChangeLog         | 5 +++++
>  gdb/testsuite/gdb.base/fileio.c | 3 +--
>  2 files changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
> index b5ba5ba59d..9fd6cea172 100644
> --- a/gdb/testsuite/ChangeLog
> +++ b/gdb/testsuite/ChangeLog
> @@ -1,3 +1,8 @@
> +2020-02-03  Lukas Durfina  <ldurfina@tachyum.com>
> +
> +	* gdb.base/fileio.c: Remove #include of <sys/errno.h>.
> +	Replace #include of <sys/fcntl.h> by <fcntl.h>.
> +
>  2020-02-01  Tom de Vries  <tdevries@suse.de>
>  
>  	* gdb.server/server-kill-python.exp: Fix $gdb_tst_name typo.
> diff --git a/gdb/testsuite/gdb.base/fileio.c b/gdb/testsuite/gdb.base/fileio.c
> index 7f482a34d3..0f201518b7 100644
> --- a/gdb/testsuite/gdb.base/fileio.c
> +++ b/gdb/testsuite/gdb.base/fileio.c
> @@ -1,13 +1,12 @@
>  #include <stdio.h>
>  #include <stdlib.h>
>  #include <string.h>
> -#include <sys/errno.h>
>  #include <sys/types.h>
> -#include <sys/fcntl.h>
>  #include <sys/stat.h>
>  #include <sys/time.h>
>  #include <errno.h>
>  #include <sys/wait.h>
> +#include <fcntl.h>
>  #include <unistd.h>
>  #include <time.h>
>  /* TESTS :
> -- 
> 2.17.1

-- 
Joel



More information about the Gdb-patches mailing list