From 69bc36e72ba0810dfb3490f4c75af132a0640499 Mon Sep 17 00:00:00 2001 From: Sean Hefty Date: Mon, 3 Dec 2012 11:30:29 -0800 Subject: [PATCH] import --- meta | 5 ++- patches/librdmacm-fixed-build-problem- | 60 ++++++++++++++++++++++++++ 2 files changed, 63 insertions(+), 2 deletions(-) create mode 100644 patches/librdmacm-fixed-build-problem- diff --git a/meta b/meta index af2a17e8..db155687 100644 --- a/meta +++ b/meta @@ -1,7 +1,8 @@ Version: 1 -Previous: a5ca830e100d7681afcf64583e7ea37d92c21367 -Head: ab0d488c1e3ba7658f61a4d8da022b5afc17737f +Previous: 797b6a2fe1b6b5929081f47e8c1322e8cc179f43 +Head: 45ca7006b9258888ea1721c837b558947ef5be07 Applied: + librdmacm-fixed-build-problem-: 45ca7006b9258888ea1721c837b558947ef5be07 Unapplied: dsocket: f8e4ababdee71863405d63f568dd9fa5fcf3ba7d test-udp: f6c78ad2a26f452cf166aff1baa7b76160bd8bf7 diff --git a/patches/librdmacm-fixed-build-problem- b/patches/librdmacm-fixed-build-problem- new file mode 100644 index 00000000..37e8b0b1 --- /dev/null +++ b/patches/librdmacm-fixed-build-problem- @@ -0,0 +1,60 @@ +Bottom: 92d2aab8615c3d1003fee963587c4078b732e465 +Top: 1fa07c62817ac4b6cb8d9c5e327ea2cdc75dbd21 +Author: Or Gerlitz +Date: 2012-12-02 12:04:23 +0000 + +[librdmacm] Fixed build problem due to missing macro + +rsocket.c wasn't passing compilation as of missing definition for the +container_of macro, fix it. Reported-by: Eyal Salamon + +Signed-off-by: Or Gerlitz + + +--- + +diff --git a/src/cma.c b/src/cma.c +index 91bf108..388be61 100755 +--- a/src/cma.c ++++ b/src/cma.c +@@ -124,11 +124,6 @@ static pthread_mutex_t mut = PTHREAD_MUTEX_INITIALIZER; + static int abi_ver = RDMA_USER_CM_MAX_ABI_VERSION; + int af_ib_support; + +-#ifndef container_of +-#define container_of(ptr, type, field) \ +- ((type *) ((void *)ptr - offsetof(type, field))) +-#endif +- + static void ucma_cleanup(void) + { + ucma_ib_cleanup(); +diff --git a/src/cma.h b/src/cma.h +index 6a1cd75..0a0370e 100644 +--- a/src/cma.h ++++ b/src/cma.h +@@ -71,6 +71,12 @@ static inline uint64_t ntohll(uint64_t x) { return x; } + #define max(a, b) ((a) > (b) ? a : b) + #define min(a, b) ((a) < (b) ? a : b) + ++#ifndef container_of ++#define container_of(ptr, type, field) \ ++ ((type *) ((void *)ptr - offsetof(type, field))) ++#endif ++ ++ + /* + * Fast synchronization for low contention locking. + */ +diff --git a/src/rsocket.c b/src/rsocket.c +index 58fcb8e..a060f66 100644 +--- a/src/rsocket.c ++++ b/src/rsocket.c +@@ -43,6 +43,7 @@ + #include + #include + #include ++#include + #include + #include + #include -- 2.46.0