diff options
Diffstat (limited to 'poky/meta/recipes-core/systemd/systemd/0020-Fix-incompatible-pointer-type-struct-sockaddr_un.patch')
-rw-r--r-- | poky/meta/recipes-core/systemd/systemd/0020-Fix-incompatible-pointer-type-struct-sockaddr_un.patch | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/poky/meta/recipes-core/systemd/systemd/0020-Fix-incompatible-pointer-type-struct-sockaddr_un.patch b/poky/meta/recipes-core/systemd/systemd/0020-Fix-incompatible-pointer-type-struct-sockaddr_un.patch new file mode 100644 index 000000000..f74de4384 --- /dev/null +++ b/poky/meta/recipes-core/systemd/systemd/0020-Fix-incompatible-pointer-type-struct-sockaddr_un.patch @@ -0,0 +1,40 @@ +From 9abbc5e69e21aef0d4d4567e69302fa660b76c53 Mon Sep 17 00:00:00 2001 +From: Alex Kiernan <alex.kiernan@gmail.com> +Date: Fri, 7 Aug 2020 15:20:17 +0000 +Subject: [PATCH 20/26] Fix incompatible pointer type struct sockaddr_un * + +| ../../../../../../workspace/sources/systemd/src/nspawn/nspawn.c: In function 'cant_be_in_netns': +| ../../../../../../workspace/sources/systemd/src/nspawn/nspawn.c:4893:25: error: passing argument 2 of 'connect' from incompatible pointer type [-Werror=incompatible-pointer-types] +| 4893 | if (connect(fd, &sa.un, SOCKADDR_UN_LEN(sa.un)) < 0) { +| | ^~~~~~ +| | | +| | struct sockaddr_un * +| In file included from ../../../../../../workspace/sources/systemd/src/systemd/sd-daemon.h:22, +| from ../../../../../../workspace/sources/systemd/src/nspawn/nspawn.c:21: +| /home/ubuntu/poky/build/tmp/work/core2-64-poky-linux-musl/systemd/1_246-r0/recipe-sysroot/usr/include/sys/socket.h:384:19: note: expected 'const struct sockaddr *' but argument is of type 'struct sockaddr_un *' +| 384 | int connect (int, const struct sockaddr *, socklen_t); +| | ^~~~~~~~~~~~~~~~~~~~~~~ +| cc1: some warnings being treated as errors + +Upstream-Status: Inappropriate [musl specific] +Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> +--- + src/nspawn/nspawn.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c +index 0842731c18..3528b7ff14 100644 +--- a/src/nspawn/nspawn.c ++++ b/src/nspawn/nspawn.c +@@ -5084,7 +5084,7 @@ static int cant_be_in_netns(void) { + if (fd < 0) + return log_error_errno(errno, "Failed to allocate udev control socket: %m"); + +- if (connect(fd, &sa.un, SOCKADDR_UN_LEN(sa.un)) < 0) { ++ if (connect(fd, (struct sockaddr *)&sa.un, SOCKADDR_UN_LEN(sa.un)) < 0) { + + if (errno == ENOENT || ERRNO_IS_DISCONNECT(errno)) + return log_error_errno(SYNTHETIC_ERRNO(EOPNOTSUPP), +-- +2.27.0 + |