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 on netbsd #1043

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/asio/include/asio/detail/impl/socket_ops.ipp
Expand Up @@ -114,7 +114,7 @@ socket_type accept(socket_type s, socket_addr_type* addr,
if (new_s == invalid_socket)
return new_s;

#if defined(__MACH__) && defined(__APPLE__) || defined(__FreeBSD__)
#if defined(__MACH__) && defined(__APPLE__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__)
int optval = 1;
int result = error_wrapper(::setsockopt(new_s,
SOL_SOCKET, SO_NOSIGPIPE, &optval, sizeof(optval)), ec);
Expand Down Expand Up @@ -1395,7 +1395,7 @@ socket_type socket(int af, int type, int protocol,
ec = asio::error_code();

return s;
#elif defined(__MACH__) && defined(__APPLE__) || defined(__FreeBSD__)
#elif defined(__MACH__) && defined(__APPLE__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__)
socket_type s = error_wrapper(::socket(af, type, protocol), ec);
if (s == invalid_socket)
return s;
Expand Down
2 changes: 1 addition & 1 deletion lib/util/easylogging++.h
Expand Up @@ -75,7 +75,7 @@
# define _ELPP_OS_FREEBSD 1
#endif
// Unix
#if ((_ELPP_OS_LINUX || _ELPP_OS_MAC || _ELPP_OS_FREEBSD) && (!_ELPP_OS_WINDOWS))
#if ((_ELPP_OS_LINUX || _ELPP_OS_MAC || _ELPP_OS_FREEBSD || __unix__) && (!_ELPP_OS_WINDOWS))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think you should modify a library file, is this change necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the better way is make a upstream pull request. but i think it's ok in practical. it's necessary if you want to build on netbsd, which is the only os to support stellar-core on raspberry pi.

# define _ELPP_OS_UNIX 1
#endif // ((_ELPP_OS_LINUX || _ELPP_OS_MAC || _ELPP_OS_FREEBSD) && (!_ELPP_OS_WINDOWS))
// Android
Expand Down
3 changes: 2 additions & 1 deletion src/util/GlobalChecks.cpp
Expand Up @@ -9,6 +9,7 @@
#endif
#include <thread>
#include <cassert>
#include <cstdlib>

namespace stellar
{
Expand All @@ -29,4 +30,4 @@ dbgAbort()
abort();
#endif
}
}
}