OpenRTX / dmrconfig

Configuration utility for DMR radios
BSD 3-Clause "New" or "Revised" License
240 stars 56 forks source link

fix compilation on macOS 12 #67

Closed keisisqrl closed 1 year ago

keisisqrl commented 2 years ago

Fixes issue #66

keisisqrl commented 2 years ago

Breaks build on 11... working on this.

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

keisisqrl commented 2 years ago

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 commented 2 years ago

Builds on macOS 13 as well.

NoelM commented 2 years ago

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?

silseva commented 1 year ago

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.

wp4nuv commented 1 year ago

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.

I'm sorry, but does this mean he's the only one who can approve this PR?

silseva commented 1 year ago

No. :) I didn't merged this PR before because, not having a Mac OS computer, I cannot determine what is the better choice between this and the #70. I'm now going to merge this and, if some issues arise, we'll see how to handle them.