Minor Change to Socket on OS X 10.6.5 #108

Closed
agrif opened this Issue May 27, 2011 · 4 comments

3 participants

@agrif

I may have been just compiling things wrong, but I needed to add the following line to the Socket source for it to compile on OS X 10.6.5 (after wrangling with libevent1 for an hour :S).

diff --git a/addons/Socket/source/Address.h b/addons/Socket/source/Address.h
index fa3041f..368b2a6 100644
--- a/addons/Socket/source/Address.h
+++ b/addons/Socket/source/Address.h
@@ -5,6 +5,7 @@

 #if !defined(_WIN32) || defined(__CYGWIN__)
 #include <unistd.h>
+#include <sys/socket.h>
 #else
 #include <ws2tcpip.h>
 #endif

Without it, socklen_t was defined as a function type, before <sys/socket.h> has a chance to define it properly.

Also, as mentioned in Issue #102, Socket is disabled by default which is a little confusing when following the examples if you're new to the language.

Awesome language, by the way. It's like the magic love-child of Objective C and Lisp.

@omf

aah, ok, missed that when buliding on Debian (it didn't break there). Thanks!

@stevedekorte

Is there a pull request for this?

@omf

There it is

@stevedekorte
Owner

Looks like this fix has been merged - please reopen if not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment