dmrconfig icon indicating copy to clipboard operation
dmrconfig copied to clipboard

fix compilation on macOS 12

Open keisisqrl opened this issue 2 years ago • 2 comments

Fixes issue #66

keisisqrl avatar Mar 14 '22 23:03 keisisqrl

Breaks build on 11... working on this.

removing -Werror would also work, but avoiding warnings is... better.

keisisqrl avatar Mar 14 '22 23:03 keisisqrl

Compiles on macOS 12 and macOS 11.5, I don't have anything else to test. As documented in comments this uses clang features to gate the new functionality and C pragmas to quiet it about the deprecated definition. It may break in future if kIOMasterPortDefault is moved from deprecated to obsolete but for now, here's a fix.

keisisqrl avatar Mar 14 '22 23:03 keisisqrl

Builds on macOS 13 as well.

keisisqrl avatar Oct 27 '22 18:10 keisisqrl

Thanks for the patch! I was doing the same based on the Availability.h provided by Apple, with their recommended implementation: https://github.com/NoelM/dmrconfig/compare/master...bug/fix-mac-os-12+-builds

Could you tell me if there's a difference with pragmas? Also I see you PR stuck for a while, nobody maintains this package?

NoelM avatar Nov 30 '22 19:11 NoelM

Hi! We're trying to restart maintaining dmrconfig, after Serge decided to move it under the OpenRTX organization since, at the moment, he cannot actively work on it. About the differences between this solution and @NoelM 's one: the main one is that the one based on pragmas does the selection at compile time, which will prevent the arising of deprecation warnings or similar stuff.

silseva avatar Dec 02 '22 11:12 silseva