aboutsummaryrefslogtreecommitdiff
path: root/misc/cgo/test/issue24161e0/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'misc/cgo/test/issue24161e0/main.go')
-rw-r--r--misc/cgo/test/issue24161e0/main.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/misc/cgo/test/issue24161e0/main.go b/misc/cgo/test/issue24161e0/main.go
index 4e2e4b01d3..72985b6c77 100644
--- a/misc/cgo/test/issue24161e0/main.go
+++ b/misc/cgo/test/issue24161e0/main.go
@@ -9,9 +9,10 @@ package issue24161e0
/*
#cgo CFLAGS: -x objective-c
#cgo LDFLAGS: -framework CoreFoundation -framework Security
+#include <TargetConditionals.h>
#include <CoreFoundation/CoreFoundation.h>
#include <Security/Security.h>
-#if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101200
+#if TARGET_OS_OSX && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101200
typedef CFStringRef SecKeyAlgorithm;
static CFDataRef SecKeyCreateSignature(SecKeyRef key, SecKeyAlgorithm algorithm, CFDataRef dataToSign, CFErrorRef *error){return NULL;}
#define kSecKeyAlgorithmECDSASignatureDigestX962SHA1 foo()