From 7a9377de34afe860897b0139ec04798ff583d467 Mon Sep 17 00:00:00 2001 From: Lior Halphon Date: Sun, 22 Jan 2017 21:53:52 +0200 Subject: [PATCH] Fixed compilation issues under more recent Xcode versions --- HexFiend/HFTextRepresenter.m | 2 +- Makefile | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/HexFiend/HFTextRepresenter.m b/HexFiend/HFTextRepresenter.m index edc3515..276e0cb 100644 --- a/HexFiend/HFTextRepresenter.m +++ b/HexFiend/HFTextRepresenter.m @@ -86,7 +86,7 @@ HFASSERT(byteRange.length > 0); HFRange displayedRange = [self entireDisplayedRange]; HFRange intersection = HFIntersectionRange(displayedRange, byteRange); - NSRect result; + NSRect result = {{0,},}; if (intersection.length > 0) { NSRange intersectionNSRange = NSMakeRange(ll2l(intersection.location - displayedRange.location), ll2l(intersection.length)); if (intersectionNSRange.length > 0) { diff --git a/Makefile b/Makefile index ffe52cc..8b21e45 100755 --- a/Makefile +++ b/Makefile @@ -46,8 +46,9 @@ LDFLAGS += -lc -lm endif ifeq ($(PLATFORM),Darwin) +SYSROOT := $(shell xcodebuild -sdk macosx -version Path 2> /dev/null) CFLAGS += -F/Library/Frameworks -OCFLAGS += -x objective-c -fobjc-arc -Wno-deprecated-declarations -isysroot $(shell xcode-select -p)/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -mmacosx-version-min=10.9 +OCFLAGS += -x objective-c -fobjc-arc -Wno-deprecated-declarations -isysroot $(SYSROOT) -mmacosx-version-min=10.9 LDFLAGS += -framework AppKit -framework Carbon -framework QuartzCore SDL_LDFLAGS := -framework SDL endif