socket-util: Replace sockaddr length macros with functions

There's no need for these to be macros, let's just make them regular
functions instead.
This commit is contained in:
Daan De Meyer
2025-05-02 09:41:41 +02:00
parent 256c4203f9
commit a0233fcd86
21 changed files with 78 additions and 81 deletions
+1 -1
View File
@@ -3660,7 +3660,7 @@ static int setup_notify_child(const void *directory) {
(void) sockaddr_un_unlink(&sa.un);
WITH_UMASK(0577) { /* only set "w" bit, which is all that's necessary for connecting from the container */
r = bind(fd, &sa.sa, SOCKADDR_UN_LEN(sa.un));
r = bind(fd, &sa.sa, sockaddr_un_len(&sa.un));
if (r < 0)
return log_error_errno(errno, "bind(" NSPAWN_NOTIFY_SOCKET_PATH ") failed: %m");
}