summary refs log tree commit diff
path: root/pkgs/os-specific/darwin/DarwinTools/sw_vers-CFPriv.patch
blob: 6faeaa75025e6463ae96ecb3dbd0f16eb7b050eb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
--- a/sw_vers.c	2021-04-19 13:06:50.131346864 +0900
+++ b/sw_vers.c	2021-04-19 13:07:32.481967474 +0900
@@ -28,7 +28,15 @@
  */
 
 #include <CoreFoundation/CoreFoundation.h>
-#include <CoreFoundation/CFPriv.h>
+
+// Avoid dependency on CoreFoundation/CFPriv, which no longer appears to be
+// part of the upstream sdk.
+
+CFDictionaryRef _CFCopyServerVersionDictionary(void);
+CFDictionaryRef _CFCopySystemVersionDictionary(void);
+extern CFStringRef _kCFSystemVersionProductNameKey;
+extern CFStringRef _kCFSystemVersionProductVersionKey;
+extern CFStringRef _kCFSystemVersionBuildVersionKey;
 
 void usage(char *progname) {
 	fprintf(stderr, "Usage: %s [-productName|-productVersion|-buildVersion]\n", progname);