LKML Archive on
 help / Atom feed
From: Anders Roxell <>
Cc:, Anders Roxell <>
Subject: [PATCH] samples: Kconfig: readd BROKEN to SAMPLE_STATX
Date: Wed, 19 Dec 2018 15:00:40 +0100
Message-ID: <> (raw)

Commit c1cae12e6b4a ("vfs: Add a sample program for the new mount API")
introduced a build error (regression) when building an allmodconfig
kernel. Before that SAMPLE_STATX had a "depends on BROKEN", and it got
removed in the patch.

When building an allmodconfig kernel, option SAMPLE_VFS gets enabled
and produce the following build error:

In file included from /usr/include/x86_64-linux-gnu/sys/stat.h:446,
                 from ../samples/vfs/test-statx.c:28:
/usr/include/x86_64-linux-gnu/bits/statx.h:25:8: error: redefinition of ‘struct statx_timestamp’
 struct statx_timestamp
In file included from ../samples/vfs/test-statx.c:26:
./usr/include/linux/stat.h:56:8: note: originally defined here
 struct statx_timestamp {
In file included from /usr/include/x86_64-linux-gnu/sys/stat.h:446,
                 from ../samples/vfs/test-statx.c:28:
/usr/include/x86_64-linux-gnu/bits/statx.h:36:8: error: redefinition of ‘struct statx’
 struct statx
In file included from ../samples/vfs/test-statx.c:26:
./usr/include/linux/stat.h:99:8: note: originally defined here
 struct statx {
../samples/vfs/test-statx.c:40:9: error: conflicting types for ‘statx’
 ssize_t statx(int dfd, const char *filename, unsigned flags,
In file included from /usr/include/x86_64-linux-gnu/sys/stat.h:446,
                 from ../samples/vfs/test-statx.c:28:
/usr/include/x86_64-linux-gnu/bits/statx.h:87:5: note: previous declaration of ‘statx’ was here
 int statx (int __dirfd, const char *__restrict __path, int __flags,
make[3]: *** [scripts/ samples/vfs/test-statx] Error 1
make[3]: Target '__build' not remade because of errors.
make[2]: *** [../scripts/ samples/vfs] Error 2
make[2]: Target '__build' not remade because of errors.
make[1]: *** [/srv/src/kernel/testing/Makefile:1065: samples] Error 2

Rework so that SAMPLE_STATX depends on BROKEN, and SAMPLE_VFS enables
the newly added test.

Signed-off-by: Anders Roxell <>
 samples/Kconfig      | 7 +++++++
 samples/vfs/Makefile | 3 ++-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/samples/Kconfig b/samples/Kconfig
index dc4eb5355fad..8253c8ce7632 100644
--- a/samples/Kconfig
+++ b/samples/Kconfig
@@ -147,6 +147,13 @@ config SAMPLE_VFIO_MDEV_MBOCHS
 	  Specifically it does *not* include any legacy vga stuff.
 	  Device looks a lot like "qemu -device secondary-vga".
+	bool "Build example extended-stat using code"
+	depends on BROKEN
+	depends on SAMPLE_VFS
+	help
+	  Build example userspace program to use the new extended-stat syscall.
 config SAMPLE_VFS
 	bool "Build example programs that use new VFS system calls"
diff --git a/samples/vfs/Makefile b/samples/vfs/Makefile
index 4ac9690fb3c4..fe510c6d5e52 100644
--- a/samples/vfs/Makefile
+++ b/samples/vfs/Makefile
@@ -1,6 +1,7 @@
 # List of programs to build
 hostprogs-$(CONFIG_SAMPLE_VFS) := \
-	test-fsmount \
+	test-fsmount
+hostprogs-$(CONFIG_SAMPLE_STATX) := \
 # Tell kbuild to always build the programs

                 reply index

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

LKML Archive on

Archives are clonable:
	git clone --mirror lkml/git/0.git
	git clone --mirror lkml/git/1.git
	git clone --mirror lkml/git/2.git
	git clone --mirror lkml/git/3.git
	git clone --mirror lkml/git/4.git
	git clone --mirror lkml/git/5.git
	git clone --mirror lkml/git/6.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lkml lkml/ \
	public-inbox-index lkml

Newsgroup available over NNTP:

AGPL code for this site: git clone public-inbox