mirror of
https://github.com/akuker/RASCSI.git
synced 2024-05-28 09:41:33 +00:00
Improve BSD compile-time compatibility (#1342)
This commit is contained in:
parent
70bcb78d24
commit
bb602040e2
|
@ -144,7 +144,7 @@ uint32_t SBC_Version::GetPeripheralAddress(void)
|
||||||
|
|
||||||
return address;
|
return address;
|
||||||
}
|
}
|
||||||
#elif defined __NetBSD__
|
#elif defined __NetBSD__ && (!defined(__x86_64__) || defined(__X86__))
|
||||||
uint32_t SBC_Version::GetPeripheralAddress(void)
|
uint32_t SBC_Version::GetPeripheralAddress(void)
|
||||||
{
|
{
|
||||||
char buf[1024];
|
char buf[1024];
|
||||||
|
|
|
@ -42,7 +42,8 @@ string PiscsiService::Init(const callback& cb, int port)
|
||||||
server.sin_family = PF_INET;
|
server.sin_family = PF_INET;
|
||||||
server.sin_port = htons((uint16_t)port);
|
server.sin_port = htons((uint16_t)port);
|
||||||
server.sin_addr.s_addr = INADDR_ANY;
|
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();
|
Stop();
|
||||||
return "Port " + to_string(port) + " is in use, is piscsi already running?";
|
return "Port " + to_string(port) + " is in use, is piscsi already running?";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user