aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/devdraw
diff options
context:
space:
mode:
authorRudá Moura <ruda.moura@gmail.com>2017-03-26 05:09:00 +0000
committerDavid du Colombier <0intro@gmail.com>2017-10-09 10:26:14 +0200
commit680c57a15c51c302d89aec134e25f08820d3f30d (patch)
tree8e20709ea3ec65dc03c53526292c97146abb9837 /src/cmd/devdraw
parentc665ab76a83dbe4a56410d3f65e02716cd773a6d (diff)
downloadplan9port-680c57a15c51c302d89aec134e25f08820d3f30d.tar.gz
plan9port-680c57a15c51c302d89aec134e25f08820d3f30d.tar.bz2
plan9port-680c57a15c51c302d89aec134e25f08820d3f30d.zip
devdraw: fix build on macOS < 10.12
After making the build on macOS silent on commit 310ae03, the build was broken on macOS lesser than 10.12 (Sierra). This commit conditionally checks the version the of the SDK before using the defined values for silent build. Fixes #66.
Diffstat (limited to 'src/cmd/devdraw')
-rw-r--r--src/cmd/devdraw/cocoa-screen.m2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cmd/devdraw/cocoa-screen.m b/src/cmd/devdraw/cocoa-screen.m
index 6a3f70f0..e7296e44 100644
--- a/src/cmd/devdraw/cocoa-screen.m
+++ b/src/cmd/devdraw/cocoa-screen.m
@@ -29,6 +29,7 @@
#include "glendapng.h"
// Use non-deprecated names.
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= 101200
#define NSKeyDown NSEventTypeKeyDown
#define NSShiftKeyMask NSEventModifierFlagShift
#define NSAlternateKeyMask NSEventModifierFlagOption
@@ -52,6 +53,7 @@
#define NSClosableWindowMask NSWindowStyleMaskClosable
#define NSMiniaturizableWindowMask NSWindowStyleMaskMiniaturizable
#define NSBorderlessWindowMask NSWindowStyleMaskBorderless
+#endif
AUTOFRAMEWORK(Cocoa)