Skip to content

Commit

Permalink
Merge pull request #171 from Code-Hex/add/ci-build-check-intel
Browse files Browse the repository at this point in the history
fixed compile issue on macOS 12
  • Loading branch information
Code-Hex authored Nov 5, 2024
2 parents d2ef438 + 1f1e9a7 commit b32d4ed
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions virtualization_14.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ void *newVZNVMExpressControllerDeviceConfiguration(void *attachment);
void *newVZDiskBlockDeviceStorageDeviceAttachment(int fileDescriptor, bool readOnly, int syncMode, void **error);
void *newVZNetworkBlockDeviceStorageDeviceAttachment(const char *url, double timeout, bool forcedReadOnly, int syncMode, void **error, uintptr_t cgoHandle);

#ifdef INCLUDE_TARGET_OSX_14
@interface VZNetworkBlockDeviceStorageDeviceAttachmentDelegateImpl : NSObject <VZNetworkBlockDeviceStorageDeviceAttachmentDelegate>
- (instancetype)initWithHandle:(uintptr_t)cgoHandle;
- (void)attachment:(VZNetworkBlockDeviceStorageDeviceAttachment *)attachment didEncounterError:(NSError *)error API_AVAILABLE(macos(14.0));
- (void)attachmentWasConnected:(VZNetworkBlockDeviceStorageDeviceAttachment *)attachment API_AVAILABLE(macos(14.0));
@end
#endif
2 changes: 2 additions & 0 deletions virtualization_14.m
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
RAISE_UNSUPPORTED_MACOS_EXCEPTION();
}

#ifdef INCLUDE_TARGET_OSX_14
@implementation VZNetworkBlockDeviceStorageDeviceAttachmentDelegateImpl {
uintptr_t _cgoHandle;
}
Expand All @@ -112,3 +113,4 @@ - (void)attachmentWasConnected:(VZNetworkBlockDeviceStorageDeviceAttachment *)at
attachmentWasConnectedHandler(_cgoHandle);
}
@end
#endif

0 comments on commit b32d4ed

Please sign in to comment.