[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAEWA0a6CUh+Dma5eCPqM-2oc4Ah8jrFkeNgrB0Trr7paaUT6Nw@mail.gmail.com>
Date: Tue, 16 Jan 2024 17:43:49 -0800
From: Andrei Vagin <avagin@...gle.com>
To: Hu Yadi <hu.yadi@....com>
Cc: jmorris@...ei.org, serge@...lyn.com, shuah@...nel.org,
mathieu.desnoyers@...icios.com, mic@...ikod.net, amir73il@...il.com,
brauner@...nel.org, linux-api@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-security-module@...r.kernel.org, linux-kselftest@...r.kernel.org,
514118380@...com
Subject: Re: [PATCH] selftests/filesystems:fix build error in overlayfs
On Thu, Jan 11, 2024 at 11:45 PM Hu Yadi <hu.yadi@....com> wrote:
>
> One build issue comes up due to both mount.h included dev_in_maps.c
>
> In file included from dev_in_maps.c:10:
> /usr/include/sys/mount.h:35:3: error: expected identifier before numeric constant
> 35 | MS_RDONLY = 1, /* Mount read-only. */
> | ^~~~~~~~~
> In file included from dev_in_maps.c:13:
>
> Remove one of them to solve conflict, another error comes up:
>
> dev_in_maps.c:170:6: error: implicit declaration of function ‘mount’ [-Werror=implicit-function-declaration]
> 170 | if (mount(NULL, "/", NULL, MS_SLAVE | MS_REC, NULL) == -1) {
> | ^~~~~
> cc1: all warnings being treated as errors
>
> and then , add sys_mount definition to solve it
> After both above, dev_in_maps.c can be built correctly on my mache(gcc 102,glibc-2.32,kernel-5.10)
>
> Signed-off-by: Hu Yadi <hu.yadi@....com>
Acked-by: Andrei Vagin <avagin@...gle.com>
Powered by blists - more mailing lists