From 9892407ff03db09c9cf444b9d7c1e820fe3fa079 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Wed, 27 Jan 2021 00:32:38 +0100 Subject: Use system getopt in capture utility on unix. This fixes header clash between getopt.h and unistd.h (required for unlink), which prevented LTO on macos. --- capture/build/unix/build.mk | 2 +- capture/src/capture.cpp | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'capture') diff --git a/capture/build/unix/build.mk b/capture/build/unix/build.mk index de689f92..6fc1aa6f 100644 --- a/capture/build/unix/build.mk +++ b/capture/build/unix/build.mk @@ -6,7 +6,7 @@ LIBS += $(shell pkg-config --libs capstone) -lpthread PROJECT := capture IMAGE := $(PROJECT)-$(BUILD) -FILTER := +FILTER := ../../../getopt/getopt.c include ../../../common/src-from-vcxproj.mk include ../../../common/unix.mk diff --git a/capture/src/capture.cpp b/capture/src/capture.cpp index c2122dec..f42279a6 100644 --- a/capture/src/capture.cpp +++ b/capture/src/capture.cpp @@ -19,7 +19,10 @@ #include "../../server/TracyPrint.hpp" #include "../../server/TracyStackFrames.hpp" #include "../../server/TracyWorker.hpp" -#include "../../getopt/getopt.h" + +#ifdef _WIN32 +# include "../../getopt/getopt.h" +#endif bool disconnect = false; -- cgit v1.2.3