depot/pkgs/os-specific/darwin/DarwinTools/sw_vers-CFPriv.patch
Luke Granger-Brown 57725ef3ec Squashed 'third_party/nixpkgs/' content from commit 76612b17c0ce
git-subtree-dir: third_party/nixpkgs
git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
2024-11-10 23:59:47 +00:00

19 lines
715 B
Diff

--- 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);