diff mbox series

samples: watch_queue: add HEADERS_INSTALL dependency

Message ID 20190907020631.29359-1-yamada.masahiro@socionext.com
State New
Headers show
Series samples: watch_queue: add HEADERS_INSTALL dependency | expand

Commit Message

Masahiro Yamada Sept. 7, 2019, 2:06 a.m. UTC
samples/watch_queue/Makefile specifies the header search path
-I$(objtree)/usr/include, which is probaby needed to include
<linux/watch_queue.h> etc.

To make it work properly, add "depends on HEADERS_INSTALL" so that
headers are installed into $(objtree)/usr/include before building
this sample.

Fixes: 7141642ed120 ("Add sample notification program")
Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>

---

Arnd reported a build error:
https://lkml.org/lkml/2019/9/6/665

Missing "depends on HEADERS_INSTALL" is the only reason
I have in my mind.

If it still fails to build, I do not know why.


 samples/Kconfig | 1 +
 1 file changed, 1 insertion(+)

-- 
2.17.1

Comments

Arnd Bergmann Sept. 7, 2019, 12:53 p.m. UTC | #1
On Sat, Sep 7, 2019 at 4:07 AM Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
>

> samples/watch_queue/Makefile specifies the header search path

> -I$(objtree)/usr/include, which is probaby needed to include

> <linux/watch_queue.h> etc.

>

> To make it work properly, add "depends on HEADERS_INSTALL" so that

> headers are installed into $(objtree)/usr/include before building

> this sample.

>

> Fixes: 7141642ed120 ("Add sample notification program")

> Reported-by: Arnd Bergmann <arnd@arndb.de>

> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


Tested-by: Arnd Bergmann <arnd@arndb.de>


> Arnd reported a build error:

> https://lkml.org/lkml/2019/9/6/665

>

> Missing "depends on HEADERS_INSTALL" is the only reason

> I have in my mind.

>

> If it still fails to build, I do not know why.


It works, thanks for the fix!

       Arnd
diff mbox series

Patch

diff --git a/samples/Kconfig b/samples/Kconfig
index 2c3e07addd38..d0761f29ccb0 100644
--- a/samples/Kconfig
+++ b/samples/Kconfig
@@ -171,6 +171,7 @@  config SAMPLE_VFS
 
 config SAMPLE_WATCH_QUEUE
 	bool "Build example /dev/watch_queue notification consumer"
+	depends on HEADERS_INSTALL
 	help
 	  Build example userspace program to use the new mount_notify(),
 	  sb_notify() syscalls and the KEYCTL_WATCH_KEY keyctl() function.