From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Jules Maselbas <jmaselbas@zdiv.net>,
Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH master 2/3] sandbox: don't build tap support code without CONFIG_DRIVER_NET_TAP
Date: Tue, 25 Mar 2025 13:47:39 +0100 [thread overview]
Message-ID: <20250325124740.4035964-3-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20250325124740.4035964-1-a.fatoum@pengutronix.de>
There's no point in compiling tap_alloc() if it's not going to be used.
As the file unconditionally uses <linux/*.h> headers, it breaks the
build, when those are not available.
Therefore only build the file if actually needed.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
arch/sandbox/os/Makefile | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/sandbox/os/Makefile b/arch/sandbox/os/Makefile
index 7a76fb0290e8..c40bc78d31dd 100644
--- a/arch/sandbox/os/Makefile
+++ b/arch/sandbox/os/Makefile
@@ -20,7 +20,8 @@ ifeq ($(CONFIG_SANDBOX_LINUX_I386),y)
KBUILD_CFLAGS += -m32
endif
-obj-y = common.o tap.o setjmp.o
+obj-y = common.o setjmp.o
+obj-$(CONFIG_DRIVER_NET_TAP) += tap.o
obj-$(CONFIG_MALLOC_LIBC) += libc_malloc.o
CFLAGS_sdl.o = $(shell $(PKG_CONFIG) sdl2 --cflags)
--
2.39.5
next prev parent reply other threads:[~2025-03-25 13:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-25 12:47 [PATCH master 0/3] sandbox: enable building under musl Ahmad Fatoum
2025-03-25 12:47 ` [PATCH master 1/3] sandbox: use POSIX header instead of Linux one Ahmad Fatoum
2025-03-25 12:47 ` Ahmad Fatoum [this message]
2025-03-25 12:47 ` [PATCH master 3/3] sandbox: os: tap: make it compile with musl Ahmad Fatoum
2025-03-27 8:13 ` [PATCH master 0/3] sandbox: enable building under musl Sascha Hauer
Reply instructions:
You may reply publicly 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:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250325124740.4035964-3-a.fatoum@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=jmaselbas@zdiv.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox