Skip to content

Commit

Permalink
Partial fix for building on Mac OS X < 10.12
Browse files Browse the repository at this point in the history
This commit reverts #3357.

The previous PR is for the new symbol NSEventMaskKeyDown, which is
introduced in #3347. In #3794, #3347 is reverted, so the workaround
in #3357 is no longer needed. Furthermore, it causes build failures
on 10.11 (#3932) as the header file for type NSEventMask is removed
in #3794, 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: #2899

[1] https://github.com/macports/macports-ports/blob/de1bb703ad19c258ad27eb903cf510dc1930107c/security/KeePassXC/files/patch-old-mac.diff
  • Loading branch information
Chih-Hsuan Yen authored and droidmonkey committed Dec 21, 2019
1 parent c70ebe6 commit 794cc1e
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/gui/macutils/AppKitImpl.mm
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@

#import <AppKit/NSWorkspace.h>
#import <CoreVideo/CVPixelBuffer.h>
#import <Availability.h>

#if __MAC_OS_X_VERSION_MAX_ALLOWED < 101200
static const NSEventMask NSEventMaskKeyDown = NSKeyDownMask;
#endif

@implementation AppKitImpl

Expand Down

0 comments on commit 794cc1e

Please sign in to comment.