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

Fix build on OpenBSD #690

Merged
merged 1 commit into from
Mar 6, 2016
Merged

Fix build on OpenBSD #690

merged 1 commit into from
Mar 6, 2016

Conversation

tostr7191
Copy link
Contributor

If EPROTO does not exist define it as EINTR

OpenBSD does not have EPROTO: https://sourceforge.net/p/sshguard/mailman/message/21247557/

Works, tried on 1.2.dev.2 and 1.0.9.1.

@sodabrew
Copy link
Member

sodabrew commented Mar 6, 2016

Looks good! Would you mind adjusting indentation from spaces to tabs to match the surrounding code?

@sodabrew sodabrew modified the milestones: v1.2.1, v1.2.0 Mar 6, 2016
If EPROTO does not exist define it as EINTR
@tostr7191
Copy link
Contributor Author

Ah yes, did not see that. Should be fine now. Have been running the change for a week and no problems so far (on 1.0.9.1).

sodabrew added a commit that referenced this pull request Mar 6, 2016
@sodabrew sodabrew merged commit 47cadd1 into eventmachine:master Mar 6, 2016
@dt1973
Copy link

dt1973 commented Mar 14, 2016

Wait, so how'd one go about installing EventMachine on OpenBSD? Tried gem install eventmachine -v '1.2.0.dev.2' but getting the same error.

@dt1973
Copy link

dt1973 commented Mar 14, 2016

Nevermind, found http://stackoverflow.com/questions/2577346/how-to-install-gem-from-github-source and seems I can do gem specific_install.

@sodabrew
Copy link
Member

Yep, that'll tide you over!

@sodabrew
Copy link
Member

EventMachine 1.2.0 is now released!

@rollcat
Copy link

rollcat commented Mar 21, 2016

Hi guys, any chance of backporting the fix to the 1.0.9.* branch? Currently Sensu 0.22.2 still requires eventmachine 1.0.9.1 - it doesn't seem to work with 1.2, but this simple patch against the tag v1.0.9.1 makes it work perfectly:

diff --git a/ext/ed.cpp b/ext/ed.cpp
index a3b23a4..12a4a20 100644
--- a/ext/ed.cpp
+++ b/ext/ed.cpp
@@ -874,6 +874,9 @@ void ConnectionDescriptor::_DispatchInboundData (const char *buffer, unsigned lo
                // If our SSL handshake had a problem, shut down the connection.
                if (s == -2) {
                        #ifdef OS_UNIX
+                       #ifndef EPROTO
+                       #define EPROTO EINTR
+                       #endif
                        UnbindReasonCode = EPROTO;
                        #endif
                        #ifdef OS_WIN32

Would it be possible to do another release in the 1.0.9 branch? I have created an issue with Sensu, asking if they'd bump their requirement.

@sodabrew
Copy link
Member

Definitely, I'll work on it this week.

@rollcat
Copy link

rollcat commented Apr 7, 2016

Sensu has moved to eventmachine 1.2 in a new release, I believe we're good here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants