diff options
Diffstat (limited to 'ext/socket')
-rw-r--r-- | ext/socket/socket.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ext/socket/socket.c b/ext/socket/socket.c index 175db9b560..7fe4e3defa 100644 --- a/ext/socket/socket.c +++ b/ext/socket/socket.c @@ -766,9 +766,9 @@ bsock_do_not_rev_lookup_set(VALUE self, VALUE val) return val; } -NORETURN(static void raise_socket_error(char *, int)); +NORETURN(static void raise_socket_error(const char *, int)); static void -raise_socket_error(char *reason, int error) +raise_socket_error(const char *reason, int error) { #ifdef EAI_SYSTEM if (error == EAI_SYSTEM) rb_sys_fail(reason); @@ -1239,7 +1239,7 @@ init_inetsock_internal(struct inetsock_arg *arg) int type = arg->type; struct addrinfo *res; int fd, status = 0; - char *syscall; + const char *syscall; arg->remote.res = sock_addrinfo(arg->remote.host, arg->remote.serv, SOCK_STREAM, (type == INET_SERVER) ? AI_PASSIVE : 0); @@ -1870,7 +1870,7 @@ unix_init(VALUE sock, VALUE path) return init_unixsock(sock, path, 0); } -static char* +static const char* unixpath(struct sockaddr_un *sockaddr, socklen_t len) { if (sockaddr->sun_path < (char*)sockaddr + len) @@ -3462,7 +3462,7 @@ static VALUE sock_s_unpack_sockaddr_un(VALUE self, VALUE addr) { struct sockaddr_un * sockaddr; - char *sun_path; + const char *sun_path; VALUE path; sockaddr = (struct sockaddr_un*)StringValuePtr(addr); @@ -3488,7 +3488,7 @@ sock_s_unpack_sockaddr_un(VALUE self, VALUE addr) static VALUE mConst; static void -sock_define_const(char *name, int value) +sock_define_const(const char *name, int value) { rb_define_const(rb_cSocket, name, INT2FIX(value)); rb_define_const(mConst, name, INT2FIX(value)); |