Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/wolfpld/tracy.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBartosz Taudul <bartosz.taudul@game-lion.com>2021-01-27 02:32:38 +0300
committerBartosz Taudul <bartosz.taudul@game-lion.com>2021-01-27 02:32:38 +0300
commit9892407ff03db09c9cf444b9d7c1e820fe3fa079 (patch)
tree9692ab9418ee73b7f5c19f9e02d80a73a2717f37 /capture
parente3ae2c077f7de12652997abd60ffd702345c1596 (diff)
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.
Diffstat (limited to 'capture')
-rw-r--r--capture/build/unix/build.mk2
-rw-r--r--capture/src/capture.cpp5
2 files changed, 5 insertions, 2 deletions
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;