aboutsummaryrefslogtreecommitdiffstats
path: root/ext/socket/mkconstants.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ext/socket/mkconstants.rb')
-rw-r--r--ext/socket/mkconstants.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/ext/socket/mkconstants.rb b/ext/socket/mkconstants.rb
index d3eac7f3f1..a4f7569f88 100644
--- a/ext/socket/mkconstants.rb
+++ b/ext/socket/mkconstants.rb
@@ -151,6 +151,12 @@ socktype_to_int(char *str, int len, int *valp)
<%= gen_name_to_int("str", "len", "valp", /\ASOCK_/) %>
}
+static int
+level_to_int(char *str, int len, int *valp)
+{
+<%= gen_name_to_int("str", "len", "valp", /\A(SOL_SOCKET\z|IPPROTO_)/) %>
+}
+
static char *
family_to_str(int val)
{