From: "Steven Rostedt (VMware)" <rostedt@xxxxxxxxxxx> The sample in libtracefs-stream.txt references SPLICE_F_NONBLOCK but that requires including "fcntl.h" and defining _GNU_SOURCE. Without that, the sample fails to compile. Adding $(CFLAGS) to the build adds the _GNU_SOURCE define. Signed-off-by: Steven Rostedt (VMware) <rostedt@xxxxxxxxxxx> --- Documentation/libtracefs-stream.txt | 1 + samples/Makefile | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Documentation/libtracefs-stream.txt b/Documentation/libtracefs-stream.txt index 7d723c5e5673..68ec8c3649ba 100644 --- a/Documentation/libtracefs-stream.txt +++ b/Documentation/libtracefs-stream.txt @@ -51,6 +51,7 @@ EXAMPLE #include <stdlib.h> #include <unistd.h> #include <signal.h> +#include <fcntl.h> #include <tracefs.h> diff --git a/samples/Makefile b/samples/Makefile index 6ee57fecacbd..4ccd28dcebaa 100644 --- a/samples/Makefile +++ b/samples/Makefile @@ -63,7 +63,7 @@ $(EXAMPLES): $(patsubst %,$(bdir)/%,$(TARGETS)) # $(CC) -g -Wall -c -o $@ $^ -I../include/ $(LIBTRACEEVENT_INCLUDES) $(bdir)/%.o: %.c - $(CC) -g -Wall -c -o $@ $^ -I../include/ $(LIBTRACEEVENT_INCLUDES) + $(CC) -g -Wall -c $(CFLAGS) -o $@ $^ -I../include/ $(LIBTRACEEVENT_INCLUDES) clean: $(RM) $(bdir)/* -- 2.33.0