diff options
author | Khem Raj <raj.khem@gmail.com> | 2024-06-21 22:26:34 -0700 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2024-06-21 22:27:51 -0700 |
commit | 69769ff44ed0572a7b3c769ce3c36f28fff359d1 (patch) | |
tree | 2890a63dbdeda9b6238f77343c4da2c04243e6f9 | |
parent | 6fe1441f128470f4947b1d4ec8c955ce49b3742b (diff) | |
download | meta-openembedded-69769ff44ed0572a7b3c769ce3c36f28fff359d1.tar.gz |
rdma-core: Fix recvfrom override errors with glibc 2.40 and clang
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r-- | meta-networking/recipes-support/rdma-core/rdma-core/0001-librdmacm-Use-overloadable-function-attribute-with-c.patch | 40 | ||||
-rw-r--r-- | meta-networking/recipes-support/rdma-core/rdma-core_51.0.bb | 1 |
2 files changed, 41 insertions, 0 deletions
diff --git a/meta-networking/recipes-support/rdma-core/rdma-core/0001-librdmacm-Use-overloadable-function-attribute-with-c.patch b/meta-networking/recipes-support/rdma-core/rdma-core/0001-librdmacm-Use-overloadable-function-attribute-with-c.patch new file mode 100644 index 000000000..9cd240189 --- /dev/null +++ b/meta-networking/recipes-support/rdma-core/rdma-core/0001-librdmacm-Use-overloadable-function-attribute-with-c.patch | |||
@@ -0,0 +1,40 @@ | |||
1 | From c7de6834f0cd92b7341ab17a5c6996f3fbd40140 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 21 Jun 2024 22:16:47 -0700 | ||
4 | Subject: [PATCH] librdmacm: Use overloadable function attribute with clang | ||
5 | |||
6 | This is to fix build warnings seen with upcoming clang19 and | ||
7 | glibc 2.40, since glibc 2.40 has improved fortyfying this | ||
8 | function with clang, it ends up with build errors like below | ||
9 | |||
10 | librdmacm/preload.c:796:9: error: at most one overload for a given name may lack the 'overloadable' attribute | ||
11 | | 796 | ssize_t recvfrom(int socket, void *buf, size_t len, int flags, | ||
12 | | | ^ | ||
13 | | /mnt/b/yoe/master/build/tmp/work/core2-64-yoe-linux/rdma-core/51.0/recipe-sysroot/usr/include/sys/socket.h:163:16: note: previous unmarked overload of function is here | ||
14 | | 163 | extern ssize_t recvfrom (int __fd, void *__restrict __buf, size_t __n, | ||
15 | | | ^ | ||
16 | |||
17 | Upstream-Status: Submitted [https://github.com/linux-rdma/rdma-core/pull/1475] | ||
18 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
19 | --- | ||
20 | librdmacm/preload.c | 7 +++++-- | ||
21 | 1 file changed, 5 insertions(+), 2 deletions(-) | ||
22 | |||
23 | diff --git a/librdmacm/preload.c b/librdmacm/preload.c | ||
24 | index d46beb1bb..e09b2aa85 100644 | ||
25 | --- a/librdmacm/preload.c | ||
26 | +++ b/librdmacm/preload.c | ||
27 | @@ -792,8 +792,11 @@ ssize_t recv(int socket, void *buf, size_t len, int flags) | ||
28 | return (fd_fork_get(socket, &fd) == fd_rsocket) ? | ||
29 | rrecv(fd, buf, len, flags) : real.recv(fd, buf, len, flags); | ||
30 | } | ||
31 | - | ||
32 | -ssize_t recvfrom(int socket, void *buf, size_t len, int flags, | ||
33 | +ssize_t | ||
34 | +#ifdef __clang__ | ||
35 | +__attribute__((overloadable)) | ||
36 | +#endif | ||
37 | +recvfrom(int socket, void *buf, size_t len, int flags, | ||
38 | struct sockaddr *src_addr, socklen_t *addrlen) | ||
39 | { | ||
40 | int fd; | ||
diff --git a/meta-networking/recipes-support/rdma-core/rdma-core_51.0.bb b/meta-networking/recipes-support/rdma-core/rdma-core_51.0.bb index 7c26a8c43..0c204c109 100644 --- a/meta-networking/recipes-support/rdma-core/rdma-core_51.0.bb +++ b/meta-networking/recipes-support/rdma-core/rdma-core_51.0.bb | |||
@@ -8,6 +8,7 @@ RDEPENDS:${PN} = "bash perl" | |||
8 | SRC_URI = "git://github.com/linux-rdma/rdma-core.git;branch=master;protocol=https \ | 8 | SRC_URI = "git://github.com/linux-rdma/rdma-core.git;branch=master;protocol=https \ |
9 | file://0001-cmake-Allow-SYSTEMCTL_BIN-to-be-overridden-from-envi.patch \ | 9 | file://0001-cmake-Allow-SYSTEMCTL_BIN-to-be-overridden-from-envi.patch \ |
10 | file://0001-include-libgen.h-for-basename.patch \ | 10 | file://0001-include-libgen.h-for-basename.patch \ |
11 | file://0001-librdmacm-Use-overloadable-function-attribute-with-c.patch \ | ||
11 | " | 12 | " |
12 | SRCREV = "6cd09097ad2eebde9a7fa3d3bb09a2cea6e3c2d6" | 13 | SRCREV = "6cd09097ad2eebde9a7fa3d3bb09a2cea6e3c2d6" |
13 | S = "${WORKDIR}/git" | 14 | S = "${WORKDIR}/git" |