systemd: replace sendmsg with sendto shortcut
There is a problem with calculating .msg_namelen field of msghdr struct. Instead of .msg_name = &sa, .msg_namelen = sizeof(sa.sun_family) + strlen(sd_unix_path), it must set as .msg_namelen = sizeof(sa) // larger value than current invalid one It works on linux but when I tried to enable this feature for macOS it didn't (maybe because of different order of fields in the struct). Instead of fixing calculation, I've replaced original sendmsg call with sendto, because it's a convenient shortcut which simplifies code and can prevent such mistakes. Required for #4436
Please register or sign in to comment