mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] selftests/overlayfs: fix compilation error in overlayfs
@ 2024-02-19  7:50 Meng Li
  2024-02-19 22:30 ` Shuah Khan
  0 siblings, 1 reply; 2+ messages in thread
From: Meng Li @ 2024-02-19  7:50 UTC (permalink / raw)
  To: Shuah Khan, Andrei Vagin, Huang Rui, linux-pm
  Cc: Nathan Fontenot, Deepak Sharma, Alex Deucher, Mario Limonciello,
	Jinzhou Su, Perry Yuan, Xiaojian Du, Viresh Kumar,
	Borislav Petkov, linux-kernel, Meng Li

make -C tools/testing/selftests, compiling dev_in_maps fail.
In file included from dev_in_maps.c:10:
/usr/include/x86_64-linux-gnu/sys/mount.h:35:3: error: expected identifier before numeric constant
   35 |   MS_RDONLY = 1,                /* Mount read-only.  */
      |   ^~~~~~~~~

That sys/mount.h has to be included before linux/mount.h.

Signed-off-by: Meng Li <li.meng@amd.com>
---
 tools/testing/selftests/filesystems/overlayfs/dev_in_maps.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/filesystems/overlayfs/dev_in_maps.c b/tools/testing/selftests/filesystems/overlayfs/dev_in_maps.c
index e19ab0e85709..871a0923c06e 100644
--- a/tools/testing/selftests/filesystems/overlayfs/dev_in_maps.c
+++ b/tools/testing/selftests/filesystems/overlayfs/dev_in_maps.c
@@ -7,11 +7,11 @@
 
 #include <linux/unistd.h>
 #include <linux/types.h>
-#include <linux/mount.h>
 #include <sys/syscall.h>
 #include <sys/stat.h>
 #include <sys/mount.h>
 #include <sys/mman.h>
+#include <linux/mount.h>
 #include <sched.h>
 #include <fcntl.h>
 
-- 
2.34.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] selftests/overlayfs: fix compilation error in overlayfs
  2024-02-19  7:50 [PATCH] selftests/overlayfs: fix compilation error in overlayfs Meng Li
@ 2024-02-19 22:30 ` Shuah Khan
  0 siblings, 0 replies; 2+ messages in thread
From: Shuah Khan @ 2024-02-19 22:30 UTC (permalink / raw)
  To: Meng Li, Andrei Vagin, Huang Rui, linux-pm
  Cc: Nathan Fontenot, Deepak Sharma, Alex Deucher, Mario Limonciello,
	Jinzhou Su, Perry Yuan, Xiaojian Du, Viresh Kumar,
	Borislav Petkov, linux-kernel, Shuah Khan

On 2/19/24 00:50, Meng Li wrote:
> make -C tools/testing/selftests, compiling dev_in_maps fail.
> In file included from dev_in_maps.c:10:
> /usr/include/x86_64-linux-gnu/sys/mount.h:35:3: error: expected identifier before numeric constant
>     35 |   MS_RDONLY = 1,                /* Mount read-only.  */
>        |   ^~~~~~~~~
> 
> That sys/mount.h has to be included before linux/mount.h.
> 
> Signed-off-by: Meng Li <li.meng@amd.com>

Please resend with linux-kselftest on the cc

thanks,
-- Shuah

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-02-19 22:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-19  7:50 [PATCH] selftests/overlayfs: fix compilation error in overlayfs Meng Li
2024-02-19 22:30 ` Shuah Khan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®