aboutsummaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-support/rdma-core
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2020-01-15 20:28:52 -0800
committerKhem Raj <raj.khem@gmail.com>2020-01-15 23:17:45 -0800
commit119834ee84b492d47beb76e375398cdd7d0bb34a (patch)
tree4a21f9d85827256aac8b16ab63e5378e06d2a455 /meta-networking/recipes-support/rdma-core
parentc1c52cc582edc48fe9b38b9c7b72642b88f035bd (diff)
downloadmeta-openembedded-119834ee84b492d47beb76e375398cdd7d0bb34a.tar.gz
rdma-core: Use overloadable attribute with clang
This ensures that clang is not fussy about overloading recvfrom() Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-networking/recipes-support/rdma-core')
-rw-r--r--meta-networking/recipes-support/rdma-core/rdma-core/0001-Use-overloadable-attribute-with-clang.patch42
-rw-r--r--meta-networking/recipes-support/rdma-core/rdma-core_27.0.bb1
2 files changed, 43 insertions, 0 deletions
diff --git a/meta-networking/recipes-support/rdma-core/rdma-core/0001-Use-overloadable-attribute-with-clang.patch b/meta-networking/recipes-support/rdma-core/rdma-core/0001-Use-overloadable-attribute-with-clang.patch
new file mode 100644
index 0000000000..1ba6847d2f
--- /dev/null
+++ b/meta-networking/recipes-support/rdma-core/rdma-core/0001-Use-overloadable-attribute-with-clang.patch
@@ -0,0 +1,42 @@
+From 42976ed0a0160864b41680604ea9cdb3c175cb94 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 15 Jan 2020 17:48:28 -0800
+Subject: [PATCH] Use overloadable attribute with clang
+
+This is overriding the libc implementation
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ librdmacm/preload.c | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/librdmacm/preload.c b/librdmacm/preload.c
+index d46beb1b..b451de50 100644
+--- a/librdmacm/preload.c
++++ b/librdmacm/preload.c
+@@ -59,6 +59,12 @@
+ #include "cma.h"
+ #include "indexer.h"
+
++#ifdef __clang__
++#define OVERLOAD __attribute__((overloadable))
++#else
++#define OVERLOAD
++#endif
++
+ struct socket_calls {
+ int (*socket)(int domain, int type, int protocol);
+ int (*bind)(int socket, const struct sockaddr *addr, socklen_t addrlen);
+@@ -793,7 +799,7 @@ ssize_t recv(int socket, void *buf, size_t len, int flags)
+ rrecv(fd, buf, len, flags) : real.recv(fd, buf, len, flags);
+ }
+
+-ssize_t recvfrom(int socket, void *buf, size_t len, int flags,
++ssize_t OVERLOAD recvfrom(int socket, void *buf, size_t len, int flags,
+ struct sockaddr *src_addr, socklen_t *addrlen)
+ {
+ int fd;
+--
+2.25.0
+
diff --git a/meta-networking/recipes-support/rdma-core/rdma-core_27.0.bb b/meta-networking/recipes-support/rdma-core/rdma-core_27.0.bb
index 361d69b337..417979dc33 100644
--- a/meta-networking/recipes-support/rdma-core/rdma-core_27.0.bb
+++ b/meta-networking/recipes-support/rdma-core/rdma-core_27.0.bb
@@ -9,6 +9,7 @@ BRANCH = "stable-v${@d.getVar('PV').split('.')[0]}"
SRC_URI = "git://github.com/linux-rdma/rdma-core.git;branch=${BRANCH} \
file://0001-Remove-man-files-which-cant-be-built.patch \
file://0001-librdmacm-Use-sched_yield-instead-of-pthread_yield.patch \
+ file://0001-Use-overloadable-attribute-with-clang.patch \
"
SRCREV = "84caf035ae6123e2296b72006cd2cf698c65eb46"
S = "${WORKDIR}/git"