summaryrefslogtreecommitdiff
path: root/samples
diff options
context:
space:
mode:
Diffstat (limited to 'samples')
-rw-r--r--samples/Kconfig2
-rw-r--r--samples/Makefile2
-rw-r--r--samples/binderfs/Makefile9
-rw-r--r--samples/binderfs/binderfs_example.c1
4 files changed, 6 insertions, 8 deletions
diff --git a/samples/Kconfig b/samples/Kconfig
index 0cbb6146f3cf..953abbdebf7b 100644
--- a/samples/Kconfig
+++ b/samples/Kconfig
@@ -185,7 +185,7 @@ config SAMPLE_VFIO_MDEV_MBOCHS
config SAMPLE_ANDROID_BINDERFS
bool "Build Android binderfs example"
- depends on ANDROID_BINDERFS
+ depends on CC_CAN_LINK && HEADERS_INSTALL
help
Builds a sample program to illustrate the use of the Android binderfs
filesystem.
diff --git a/samples/Makefile b/samples/Makefile
index 29c66aadd954..4029d207cebb 100644
--- a/samples/Makefile
+++ b/samples/Makefile
@@ -2,7 +2,7 @@
# Makefile for Linux samples code
subdir-$(CONFIG_SAMPLE_AUXDISPLAY) += auxdisplay
-obj-$(CONFIG_SAMPLE_ANDROID_BINDERFS) += binderfs/
+subdir-$(CONFIG_SAMPLE_ANDROID_BINDERFS) += binderfs
obj-$(CONFIG_SAMPLE_CONFIGFS) += configfs/
obj-$(CONFIG_SAMPLE_CONNECTOR) += connector/
subdir-$(CONFIG_SAMPLE_HIDRAW) += hidraw
diff --git a/samples/binderfs/Makefile b/samples/binderfs/Makefile
index a3ac5476338a..989e4badaee2 100644
--- a/samples/binderfs/Makefile
+++ b/samples/binderfs/Makefile
@@ -1,6 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-only
-ifndef CROSS_COMPILE
-ifdef CONFIG_SAMPLE_ANDROID_BINDERFS
-hostprogs := binderfs_example
-endif
-endif
+userprogs := binderfs_example
+always-y := $(userprogs)
+
+userccflags += -I usr/include
diff --git a/samples/binderfs/binderfs_example.c b/samples/binderfs/binderfs_example.c
index 5bbd2ebc0aea..0fd92cdda460 100644
--- a/samples/binderfs/binderfs_example.c
+++ b/samples/binderfs/binderfs_example.c
@@ -18,7 +18,6 @@
int main(int argc, char *argv[])
{
int fd, ret, saved_errno;
- size_t len;
struct binderfs_device device = { 0 };
ret = unshare(CLONE_NEWNS);