summaryrefslogtreecommitdiff
path: root/ext/socket/socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/socket/socket.c')
-rw-r--r--ext/socket/socket.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/ext/socket/socket.c b/ext/socket/socket.c
index 0646f7bef40..b9de752d719 100644
--- a/ext/socket/socket.c
+++ b/ext/socket/socket.c
@@ -3557,7 +3557,16 @@ sock_define_const(const char *name, int value, VALUE mConst)
rb_define_const(rb_cSocket, name, INT2FIX(value));
rb_define_const(mConst, name, INT2FIX(value));
}
+
+static void
+sock_define_uconst(const char *name, unsigned int value, VALUE mConst)
+{
+ rb_define_const(rb_cSocket, name, UINT2NUM(value));
+ rb_define_const(mConst, name, UINT2NUM(value));
+}
+
#define sock_define_const(name, value) sock_define_const(name, value, mConst)
+#define sock_define_uconst(name, value) sock_define_uconst(name, value, mConst)
/*
* Class +Socket+ provides access to the underlying operating system