diff mbox series

[1/8] trace-cmd: Add NO_VSOCK make option to force vsock code off

Message ID 20220415010007.938408-2-rostedt@goodmis.org (mailing list archive)
State Superseded
Headers show
Series trace-cmd library: Remove dependency to vsockets | expand

Commit Message

Steven Rostedt April 15, 2022, 1 a.m. UTC
From: "Steven Rostedt (Google)" <rostedt@goodmis.org>

Add "make NO_VSOCK=1" to disable building with vsocket code. It is
equivalent to not having vsocket support on the system.

Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
 Makefile | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/Makefile b/Makefile
index 9ccaaa61fecb..982514baad01 100644
--- a/Makefile
+++ b/Makefile
@@ -287,7 +287,11 @@  CFLAGS ?= -g -Wall
 CPPFLAGS ?=
 LDFLAGS ?=
 
+ifndef NO_VSOCK
 VSOCK_DEFINED := $(shell if (echo "$(pound)include <linux/vm_sockets.h>" | $(CC) -E - >/dev/null 2>&1) ; then echo 1; else echo 0 ; fi)
+else
+VSOCK_DEFINED := 0
+endif
 
 export VSOCK_DEFINED
 ifeq ($(VSOCK_DEFINED), 1)