From e4753752d31d5c76c33cd848f119e47e1e3c398e Mon Sep 17 00:00:00 2001 From: Paul Dicker Date: Wed, 16 Apr 2025 10:52:38 +0200 Subject: [PATCH] Don't use deprecated kIOMasterPortDefault `kIOMasterPortDefault` is deprecated since macOS 12.0. One alternative is to use named constant `kIOMainPortDefault` which is not available before macOS 12.0. Both named constants are just an alias for `NULL`, so it is simpler to use it directly instead. --- src/scsi-darwin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scsi-darwin.c b/src/scsi-darwin.c index a4ca243..418dcb6 100644 --- a/src/scsi-darwin.c +++ b/src/scsi-darwin.c @@ -101,7 +101,7 @@ io_iterator_t getDVDIterator(char* ioClass) if (matchingDict == (CFMutableDictionaryRef) NULL) { return (io_iterator_t) NULL; } - ioReturnValue = IOServiceGetMatchingServices(kIOMasterPortDefault, matchingDict, &scsiObjectIterator); + ioReturnValue = IOServiceGetMatchingServices(0, matchingDict, &scsiObjectIterator); if (scsiObjectIterator == (io_iterator_t) NULL || (ioReturnValue != kIOReturnSuccess)) { return (io_iterator_t) NULL; }