From: Sean Hefty Date: Thu, 5 Nov 2015 17:40:48 +0000 (-0800) Subject: Place ifdef around container_of definition X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=HEAD;p=~shefty%2Flibibcm.git Place ifdef around container_of definition This is also defined in verbs.h. Signed-off-by: Sean Hefty --- diff --git a/src/cm.c b/src/cm.c index ceeef55..9962681 100755 --- 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) {