diff mbox series

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

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

Commit Message

Steven Rostedt April 17, 2022, 6:21 p.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)