summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/socket/basicsocket.c2
-rw-r--r--internal.h6
2 files changed, 6 insertions, 2 deletions
diff --git a/ext/socket/basicsocket.c b/ext/socket/basicsocket.c
index 045a2f5fee..40867434fc 100644
--- a/ext/socket/basicsocket.c
+++ b/ext/socket/basicsocket.c
@@ -247,8 +247,6 @@ bsock_setsockopt(int argc, VALUE *argv, VALUE sock)
break;
}
-#define rb_sys_fail_path(path) rb_sys_fail_str(path)
-
rb_io_check_closed(fptr);
if (setsockopt(fptr->fd, level, option, v, vlen) < 0)
rb_sys_fail_path(fptr->pathv);
diff --git a/internal.h b/internal.h
index 0902ac05c2..56c096a009 100644
--- a/internal.h
+++ b/internal.h
@@ -123,7 +123,13 @@ VALUE rb_get_path_check_convert(VALUE, VALUE, int);
void Init_File(void);
#ifdef RUBY_FUNCTION_NAME_STRING
+# if defined __GNUC__ && __GNUC__ >= 4
+# pragma GCC visibility push(default)
+# endif
NORETURN(void rb_sys_fail_path_with_func(const char *func_name, VALUE path));
+# if defined __GNUC__ && __GNUC__ >= 4
+# pragma GCC visibility pop
+# endif
# define rb_sys_fail_path(path) rb_sys_fail_path_with_func(RUBY_FUNCTION_NAME_STRING, path)
#else
# define rb_sys_fail_path(path) rb_sys_fail_str(path)