Re: [PATCH] io/mmap.c: fix musl build on mips64

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Apr 18, 2022 at 10:36:06PM +0200, Fabrice Fontaine wrote:
> musl undefines MAP_SYNC on some architectures such as mips64 since
> version 1.1.20 and
> https://github.com/ifduyue/musl/commit/9b57db3f958d9adc3b1c7371b5c6723aaee448b7
> resulting in the following build failure:
> 
> mmap.c: In function 'mmap_f':
> mmap.c:196:33: error: 'MAP_SYNC' undeclared (first use in this function); did you mean 'MS_SYNC'?
>   196 |                         flags = MAP_SYNC | MAP_SHARED_VALIDATE;
>       |                                 ^~~~~~~~
>       |                                 MS_SYNC
> 
> To fix this build failure, include <sys/mman.h> before the other
> includes
> 
> Fixes:
>  - http://autobuild.buildroot.org/results/3296194907baf7d3fe039f59bcbf595aa8107a28
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@xxxxxxxxx>
> ---
>  io/mmap.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/io/mmap.c b/io/mmap.c
> index 8c048a0a..b8609295 100644
> --- a/io/mmap.c
> +++ b/io/mmap.c
> @@ -4,9 +4,9 @@
>   * All Rights Reserved.
>   */
>  
> +#include <sys/mman.h>
>  #include "command.h"
>  #include "input.h"
> -#include <sys/mman.h>
>  #include <signal.h>
>  #include "init.h"
>  #include "io.h"

I can't see how this makes any difference to the problem, nor can I
see why you are having this issues.


[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux