]> git.openfabrics.org - ~shefty/libibcm.git/commitdiff
Place ifdef around container_of definition master
authorSean Hefty <sean.hefty@intel.com>
Thu, 5 Nov 2015 17:40:48 +0000 (09:40 -0800)
committerSean Hefty <sean.hefty@intel.com>
Thu, 5 Nov 2015 17:40:48 +0000 (09:40 -0800)
This is also defined in verbs.h.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
src/cm.c

index ceeef558281664bbe4ecc79612942ca55dc9a23e..996268141a048d48b793154c6fa7ab1a008bd267 100755 (executable)
--- a/src/cm.c
+++ b/src/cm.c
@@ -121,8 +121,10 @@ struct cm_id_private {
        pthread_mutex_t mut;
 };
 
+#ifndef container_of
 #define container_of(ptr, type, field) \
        ((type *) ((void *)ptr - offsetof(type, field)))
+#endif
 
 static int check_abi_version(void)
 {