nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1--- a/sw_vers.c 2021-04-19 13:06:50.131346864 +0900
2+++ b/sw_vers.c 2021-04-19 13:07:32.481967474 +0900
3@@ -28,7 +28,15 @@
4 */
5
6 #include <CoreFoundation/CoreFoundation.h>
7-#include <CoreFoundation/CFPriv.h>
8+
9+// Avoid dependency on CoreFoundation/CFPriv, which no longer appears to be
10+// part of the upstream sdk.
11+
12+CFDictionaryRef _CFCopyServerVersionDictionary(void);
13+CFDictionaryRef _CFCopySystemVersionDictionary(void);
14+extern CFStringRef _kCFSystemVersionProductNameKey;
15+extern CFStringRef _kCFSystemVersionProductVersionKey;
16+extern CFStringRef _kCFSystemVersionBuildVersionKey;
17
18 void usage(char *progname) {
19 fprintf(stderr, "Usage: %s [-productName|-productVersion|-buildVersion]\n", progname);