mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-08 21:17:47 +03:00
Merge pull request #2819 from bachradsusi/mac_selinux_bind-do-not-rely-on-errno
socket_address_listen - do not rely on errno
This commit is contained in:
commit
b5adc91a67
@ -122,7 +122,7 @@ int socket_address_listen(
|
||||
|
||||
r = mac_selinux_bind(fd, &a->sockaddr.sa, a->size);
|
||||
|
||||
if (r < 0 && errno == EADDRINUSE) {
|
||||
if (r == -EADDRINUSE) {
|
||||
/* Unlink and try again */
|
||||
unlink(a->sockaddr.un.sun_path);
|
||||
r = bind(fd, &a->sockaddr.sa, a->size);
|
||||
|
Loading…
Reference in New Issue
Block a user