summaryrefslogtreecommitdiff
path: root/ext/socket/option.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-01-21 13:39:08 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-01-21 13:39:08 +0000
commit3ffc7535ba3be6d3979f94805077ca2a9c0ea23b (patch)
tree204afab609cf2d23b7c89c8dbb9ed670f7d5a664 /ext/socket/option.c
parent6f53ea480a5a719538132f1fbf4d3f4563a3a98e (diff)
Several more OS information for TYPE_IP_MULTICAST_LOOP and
TYPE_IP_MULTICAST_TTL. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket/option.c')
-rw-r--r--ext/socket/option.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/ext/socket/option.c b/ext/socket/option.c
index 00e6be6378..d162b6da76 100644
--- a/ext/socket/option.c
+++ b/ext/socket/option.c
@@ -7,10 +7,21 @@ VALUE rb_cSockOpt;
#define CAT(x,y) x##y
#define XCAT(x,y) CAT(x,y)
-#if defined(__linux__) || defined(__FreeBSD__) || defined(__APPLE__) || defined(_WIN32)
+#if defined(__linux__) || \
+ defined(__GNU__) /* GNU/Hurd */ || \
+ defined(__FreeBSD__) || \
+ defined(__DragonFly__) || \
+ defined(__APPLE__) || \
+ defined(_WIN32) || \
+ defined(__CYGWIN__)
# define TYPE_IP_MULTICAST_LOOP int
# define TYPE_IP_MULTICAST_TTL int
#else
+/* The original IP multicast implementation by Steve Deering
+ * NetBSD
+ * OpenBSD
+ * SunOS
+ */
# define TYPE_IP_MULTICAST_LOOP byte
# define TYPE_IP_MULTICAST_TTL byte
# define USE_INSPECT_BYTE 1