Partial fix for building on Mac OS X < 10.12

This commit reverts .

The previous PR is for the new symbol NSEventMaskKeyDown, which is
introduced in . In ,  is reverted, so the workaround
in  is no longer needed. Furthermore, it causes build failures
on 10.11 () as the header file for type NSEventMask is removed
in , too.

Note that this is not a complete fix. A complete patch can be found
at [1]. In MacPorts, the OS version for building a package is the same
as the OS that installs it, so #ifdef can be used to replace @available.
The latter language feature is not available until Xcode 9.

With the patch mentioned in the previous paragraph, KeePassXC 2.5.1
can be built on Mac OS X 10.9 or newer.

Ref: 

[1] de1bb703ad/security/KeePassXC/files/patch-old-mac.diff
This commit is contained in:
Chih-Hsuan Yen 2019-11-28 19:56:49 +08:00 committed by Jonathan White
parent c70ebe6dce
commit 794cc1eeab

View file

@ -20,11 +20,6 @@
#import <AppKit/NSWorkspace.h> #import <AppKit/NSWorkspace.h>
#import <CoreVideo/CVPixelBuffer.h> #import <CoreVideo/CVPixelBuffer.h>
#import <Availability.h>
#if __MAC_OS_X_VERSION_MAX_ALLOWED < 101200
static const NSEventMask NSEventMaskKeyDown = NSKeyDownMask;
#endif
@implementation AppKitImpl @implementation AppKitImpl