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
base: master
from
Jump to file or symbol
Failed to load files and symbols.
+5 −4
Diff settings

Always

Just for now

@@ -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);
@@ -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;
Copy path View file
@@ -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))

This comment has been minimized.

@mvaneijk

mvaneijk Dec 14, 2016

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

This comment has been minimized.

@codeck

codeck Dec 14, 2016

Contributor

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
Copy path View file
@@ -9,6 +9,7 @@
#endif
#include <thread>
#include <cassert>
#include <cstdlib>
namespace stellar
{
@@ -29,4 +30,4 @@ dbgAbort()
abort();
#endif
}
}
}
ProTip! Use n and p to navigate between commits in a pull request.