Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add macos12 guards for filesharing API
File sharing was only added to macOS 12, trying to build on older versions cause warnings: virtualization.m:205:46: warning: 'setDirectorySharingDevices:' is only available on macOS 12.0 or newer [-Wunguarded-availability-new] /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Virtualization.framework/Headers/VZVirtualMachineConfiguration.h:116:79: note: 'setDirectorySharingDevices:' has been marked as being introduced in macOS 12.0 here, but the deployment target is macOS 11.0.0 virtualization.m:205:46: note: enclose 'setDirectorySharingDevices:' in an @available check to silence this warning virtualization.m:586:5: warning: 'VZSharedDirectory' is only available on macOS 12.0 or newer [-Wunguarded-availability-new] /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Virtualization.framework/Headers/VZSharedDirectory.h:16:12: note: 'VZSharedDirectory' has been marked as being introduced in macOS 12.0 here, but the deployment target is macOS 11.0.0 virtualization.m:586:5: note: enclose 'VZSharedDirectory' in an @available check to silence this warning virtualization.m:590:17: warning: 'VZSharedDirectory' is only available on macOS 12.0 or newer [-Wunguarded-availability-new] /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Virtualization.framework/Headers/VZSharedDirectory.h:16:12: note: 'VZSharedDirectory' has been marked as being introduced in macOS 12.0 here, but the deployment target is macOS 11.0.0 virtualization.m:590:17: note: enclose 'VZSharedDirectory' in an @available check to silence this warning virtualization.m:603:14: warning: 'VZSingleDirectoryShare' is only available on macOS 12.0 or newer [-Wunguarded-availability-new] /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Virtualization.framework/Headers/VZSingleDirectoryShare.h:21:12: note: 'VZSingleDirectoryShare' has been marked as being introduced in macOS 12.0 here, but the deployment target is macOS 11.0.0 virtualization.m:603:14: note: enclose 'VZSingleDirectoryShare' in an @available check to silence this warning virtualization.m:603:63: warning: 'VZSharedDirectory' is only available on macOS 12.0 or newer [-Wunguarded-availability-new] /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Virtualization.framework/Headers/VZSharedDirectory.h:16:12: note: 'VZSharedDirectory' has been marked as being introduced in macOS 12.0 here, but the deployment target is macOS 11.0.0 virtualization.m:603:63: note: enclose 'VZSharedDirectory' in an @available check to silence this warning virtualization.m:614:14: warning: 'VZMultipleDirectoryShare' is only available on macOS 12.0 or newer [-Wunguarded-availability-new] /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Virtualization.framework/Headers/VZMultipleDirectoryShare.h:21:12: note: 'VZMultipleDirectoryShare' has been marked as being introduced in macOS 12.0 here, but the deployment target is macOS 11.0.0 virtualization.m:614:14: note: enclose 'VZMultipleDirectoryShare' in an @available check to silence this warning virtualization.m:614:91: warning: 'VZSharedDirectory' is only available on macOS 12.0 or newer [-Wunguarded-availability-new] /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Virtualization.framework/Headers/VZSharedDirectory.h:16:12: note: 'VZSharedDirectory' has been marked as being introduced in macOS 12.0 here, but the deployment target is macOS 11.0.0 virtualization.m:614:91: note: enclose 'VZSharedDirectory' in an @available check to silence this warning virtualization.m:625:5: warning: 'VZVirtioFileSystemDeviceConfiguration' is only available on macOS 12.0 or newer [-Wunguarded-availability-new] /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Virtualization.framework/Headers/VZVirtioFileSystemDeviceConfiguration.h:21:12: note: 'VZVirtioFileSystemDeviceConfiguration' has been marked as being introduced in macOS 12.0 here, but the deployment target is macOS 11.0.0 virtualization.m:625:5: note: enclose 'VZVirtioFileSystemDeviceConfiguration' in an @available check to silence this warning virtualization.m:628:17: warning: 'VZVirtioFileSystemDeviceConfiguration' is only available on macOS 12.0 or newer [-Wunguarded-availability-new] /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Virtualization.framework/Headers/VZVirtioFileSystemDeviceConfiguration.h:21:12: note: 'VZVirtioFileSystemDeviceConfiguration' has been marked as being introduced in macOS 12.0 here, but the deployment target is macOS 11.0.0 virtualization.m:628:17: note: enclose 'VZVirtioFileSystemDeviceConfiguration' in an @available check to silence this warning virtualization.m:638:7: warning: 'VZVirtioFileSystemDeviceConfiguration' is only available on macOS 12.0 or newer [-Wunguarded-availability-new] /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Virtualization.framework/Headers/VZVirtioFileSystemDeviceConfiguration.h:21:12: note: 'VZVirtioFileSystemDeviceConfiguration' has been marked as being introduced in macOS 12.0 here, but the deployment target is macOS 11.0.0 virtualization.m:638:7: note: enclose 'VZVirtioFileSystemDeviceConfiguration' in an @available check to silence this warning virtualization.m:638:64: warning: 'VZDirectoryShare' is only available on macOS 12.0 or newer [-Wunguarded-availability-new] /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Virtualization.framework/Headers/VZDirectoryShare.h:24:12: note: 'VZDirectoryShare' has been marked as being introduced in macOS 12.0 here, but the deployment target is macOS 11.0.0 virtualization.m:638:64: note: enclose 'VZDirectoryShare' in an @available check to silence this warning This commit adds the suggested @available checks to avoid these compilation warnings.
- Loading branch information