crayzeewulf / libserial

Serial Port Programming in C++
BSD 3-Clause "New" or "Revised" License
398 stars 141 forks source link

Add additional linux specific encapsulation. #185

Closed mcsauder closed 1 year ago

mcsauder commented 1 year ago

Hi @crayzeewulf ,

As tracked in #184, @thewoz reports that this fixes his issue in macosX.

I'd prefer to find an alternative ifdef encapsulation limited to the serial_struct usage in the SerialPort::GetAvailableSerialPorts() function to allow macos compatibility within that function, but for now, hopefully this is at least a quick review and easy.

Let me know your thoughts!

-Mark

mcsauder commented 1 year ago

@thewoz, please let us know if this PR is functioning properly for you! Thanks for your help debugging!

crayzeewulf commented 1 year ago

Hi @crayzeewulf ,

As tracked in #184, @thewoz reports that this fixes his issue in macosX.

I'd prefer to find an alternative ifdef encapsulation limited to the serial_struct usage in the SerialPort::GetAvailableSerialPorts() function to allow macos compatibility within that function, but for now, hopefully this is at least a quick review and easy.

Let me know your thoughts!

Hi @mcsauder,

That looks pretty good to me. I agree that in the long term it might be good to come up with a different solution but this is simple enough and works. So I am all for it.

(Thanks for handling all the recent bug/support issues! I am hoping to get my hands on a MacBook to try this out.)

Edit: And, of course, thank you, @thewoz!

thewoz commented 1 year ago

no problema! PR works well! thanks to you :)