Skip to content
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

Build fixes for OpenBSD #17486

Merged
merged 1 commit into from
May 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Core/HLE/proAdhoc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2087,7 +2087,7 @@ int setSockKeepAlive(int sock, bool keepalive, const int keepinvl, const int kee
int optval = keepalive ? 1 : 0;
int optlen = sizeof(optval);
int result = setsockopt(sock, SOL_SOCKET, SO_KEEPALIVE, (char*)&optval, optlen);
#if !PPSSPP_PLATFORM(SWITCH)
#if !PPSSPP_PLATFORM(SWITCH) && !PPSSPP_PLATFORM(OPENBSD)
if (result == 0 && keepalive) {
if (getsockopt(sock, SOL_SOCKET, SO_TYPE, (char*)&optval, (socklen_t*)&optlen) == 0 && optval == SOCK_STREAM) {
optlen = sizeof(optval);
Expand All @@ -2099,7 +2099,7 @@ int setSockKeepAlive(int sock, bool keepalive, const int keepinvl, const int kee
setsockopt(sock, IPPROTO_TCP, TCP_KEEPCNT, (char*)&optval, optlen);
}
}
#endif // !PPSSPP_PLATFORM(SWITCH)
#endif // !PPSSPP_PLATFORM(SWITCH) && !PPSSPP_PLATFORM(OPENBSD)
return result;
}

Expand Down
2 changes: 1 addition & 1 deletion Core/HLE/sceNet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// Official git repository and contact information can be found at
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.

#if __linux__ || __APPLE__
#if __linux__ || __APPLE__ || defined(__OpenBSD__)
#include <unistd.h>
#include <sys/types.h>
#include <sys/mman.h>
Expand Down
1 change: 1 addition & 0 deletions Core/HLE/sceNetAdhoc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#endif

#if !defined(_WIN32)
#include <sys/types.h>
#include <netinet/tcp.h>
#endif

Expand Down
2 changes: 2 additions & 0 deletions ppsspp_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@
#define PPSSPP_PLATFORM_LINUX 1
#elif defined(__linux__)
#define PPSSPP_PLATFORM_LINUX 1
#elif defined(__OpenBSD__)
#define PPSSPP_PLATFORM_OPENBSD 1
#endif

// Windows ARM/ARM64, and Windows UWP (all), are the only platform that don't do GL at all (until Apple finally removes it)
Expand Down