Skip to content

Commit

Permalink
Improve BSD compile-time compatibility (#1342)
Browse files Browse the repository at this point in the history
  • Loading branch information
uweseimet committed Nov 16, 2023
1 parent c98cc6a commit 4b6ea70
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cpp/hal/sbc_version.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ uint32_t SBC_Version::GetPeripheralAddress(void)

return address;
}
#elif defined __NetBSD__
#elif defined __NetBSD__ && (!defined(__x86_64__) || defined(__X86__))
uint32_t SBC_Version::GetPeripheralAddress(void)
{
char buf[1024];
Expand Down
3 changes: 2 additions & 1 deletion cpp/piscsi/piscsi_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ string PiscsiService::Init(const callback& cb, int port)
server.sin_family = PF_INET;
server.sin_port = htons((uint16_t)port);
server.sin_addr.s_addr = INADDR_ANY;
if (bind(service_socket, reinterpret_cast<const sockaddr *>(&server), sizeof(sockaddr_in)) < 0) { //NOSONAR bit_cast is not supported by the bullseye compiler
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) {
Stop();
return "Port " + to_string(port) + " is in use, is piscsi already running?";
}
Expand Down

0 comments on commit 4b6ea70

Please sign in to comment.