socket_util: use g_strerror() instead of strerror()

g_strerror() is more portable, and guarantees that the returned string
is UTF-8 encoded.
This commit is contained in:
Max Kellermann 2009-03-16 11:59:26 +01:00
parent bba127a392
commit d47ef51cb3

View File

@ -121,7 +121,7 @@ socket_bind_listen(int domain, int type, int protocol,
ret = bind(fd, address, address_length); ret = bind(fd, address, address_length);
if (ret < 0) { if (ret < 0) {
g_set_error(error, listen_quark(), errno, g_set_error(error, listen_quark(), errno,
"%s", strerror(errno)); "%s", g_strerror(errno));
close(fd); close(fd);
return -1; return -1;
} }