Closed cainbit closed 2 years ago
This code is specific to Apple MacOS. Are you sure this is correct on that platform?
This code is specific to Apple MacOS. Are you sure this is correct on that platform?
Yes, I had checked the man page on MacOS 12.2.1, and the modified code works fine on my MacBook pro with a usb ttl adapter.
Thanks for the fix, this bug is introduced by a typo.
According to the the man page of fcntl, we should use F_GETFL to get flags.
The flags for the F_GETFD and F_SETFD commands are as follows:
The flags for the F_GETFL and F_SETFL commands are as follows: