-
-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve BSD compatibility #1342
Conversation
Kudos, SonarCloud Quality Gate passed! |
@uweseimet i can’t see BSD setup instructions on the linked wiki page. Are they in fact on a different page? (BTW I added back notes about AIBOM and Gamernium board types to that page. I don’t know if you removed them by mistake?) can you please remind be about the purpose of BSD support? Is this about running a BSD OS with GPIO on RPi hardware? |
These instructions have been commented out for ages, haven't they? But I might have missed something there. The NetBSD instructions are on https://github.com/PiSCSI/piscsi/wiki/Compilation-Instructions.
The purpose is to be able to compile and test piscsi also on BSD and macos. This is possible now, see the testing_macos_compile branch. In addition, using other platforms for compiling the sources ensures portability. In addition, you can run scsictl on other platforms and connect remotely to piscsi. I sometimes do this with my PC. My guess is that to run at least scsictl on a Windows PC (with the required libraries like protobuf installed) might be possible in the future. Or to run the unit tests on Windows. One of the changes (the missing cast) was actually a minor bug. |
if (bind(service_socket, reinterpret_cast<const sockaddr*>(&server), //NOSONAR bit_cast is not supported by the bullseye compiler | ||
static_cast<socklen_t>(sizeof(sockaddr_in))) < 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick, but I guess you used 4 spaces for indentation here instead of the tabs that the rest of this file uses?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, is this because a new stylistic rule about using spaces instead of tabs for indentation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's because of the Eclipse formatter. Spaces is the target format, but I don't yet want to reformat everything.
I suggest to have github ignore whitespaces, which can be configured when reviewing diffs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that's related to the C++ style ticket.
Tested with FreeBSD 14.0 and NetBSD 10.0, also see BSD setup instructions on https://github.com/PiSCSI/piscsi/wiki/Setup-Instructions.