diff --git a/common/utils/itti/memory_pools.c b/common/utils/itti/memory_pools.c
index dadc80ca2af76268bf170f11967f9f707e795d77..97ec7d8e3886823b5458db6ccaff071400c68777 100644
--- a/common/utils/itti/memory_pools.c
+++ b/common/utils/itti/memory_pools.c
@@ -54,7 +54,9 @@ uint64_t vcd_mp_free;
 #endif
 
 /*------------------------------------------------------------------------------*/
+#ifndef CHARS_TO_UINT32
 #define CHARS_TO_UINT32(c1, c2, c3, c4) (((c1) << 24) | ((c2) << 16) | ((c3) << 8) | (c4))
+#endif
 
 #define MEMORY_POOL_ITEM_INFO_NUMBER    2
 
diff --git a/openair1/PHY/defs.h b/openair1/PHY/defs.h
index 578b05634cfc40b15b2629fb25f4d1d10629fbeb..3c16ce0cd3eaa18e3271eb18710d2548d6f254c3 100755
--- a/openair1/PHY/defs.h
+++ b/openair1/PHY/defs.h
@@ -65,10 +65,12 @@
 //use msg in the real-time thread context
 #define msg_nrt printf
 //use msg_nrt in the non real-time context (for initialization, ...)
-#ifdef __AVX2__
-#define malloc16(x) memalign(32,x)
-#else
-#define malloc16(x) memalign(16,x)
+#ifndef malloc16
+#  ifdef __AVX2__
+#    define malloc16(x) memalign(32,x)
+#  else
+#    define malloc16(x) memalign(16,x)
+#  endif
 #endif
 #define free16(y,x) free(y)
 #define bigmalloc malloc
diff --git a/openair2/COMMON/openair_defs.h b/openair2/COMMON/openair_defs.h
index 0a6b88ce332a201aea191996bf822ad5206270f5..c2dd4d0616595266f82b28b5c20b91b85a1c5a6d 100755
--- a/openair2/COMMON/openair_defs.h
+++ b/openair2/COMMON/openair_defs.h
@@ -41,7 +41,13 @@
 #if !defined (msg)
 # define msg(aRGS...) LOG_D(PHY, ##aRGS)
 #endif
-#define malloc16(x) memalign(16,x) //malloc(x)
+#ifndef malloc16
+#  ifdef __AVX2__
+#    define malloc16(x) memalign(32,x)
+#  else
+#    define malloc16(x) memalign(16,x)
+#  endif
+#endif
 #define free16(y,x) free(y)
 #define bigmalloc malloc
 #define bigmalloc16 malloc16
diff --git a/openair2/RRC/LITE/rrc_eNB_S1AP.c b/openair2/RRC/LITE/rrc_eNB_S1AP.c
index d93b8eea2fd39d62c0705915eb565acc3b3134db..375fc3e0cf3194f3940f5cc8c7a247d7403dd179 100644
--- a/openair2/RRC/LITE/rrc_eNB_S1AP.c
+++ b/openair2/RRC/LITE/rrc_eNB_S1AP.c
@@ -392,6 +392,7 @@ rrc_pdcp_config_security(
 #define DEBUG_SECURITY 1
 
 #if defined (DEBUG_SECURITY)
+#undef msg
 #define msg printf
 
   if (print_keys ==1 ) {
diff --git a/openair2/UTIL/OMV/structures.h b/openair2/UTIL/OMV/structures.h
index f3b2b69d73d79e0f4645257a537c76423d050a1a..6c131371cb93f239bd2225fe95586ff5669c6b15 100755
--- a/openair2/UTIL/OMV/structures.h
+++ b/openair2/UTIL/OMV/structures.h
@@ -44,7 +44,9 @@
 #define Maxneighbor 64
 #define NUMBER_OF_UE_MAX 64
 #define NUMBER_OF_eNB_MAX 3
-#define NB_ANTENNAS_RX  4
+#ifndef NB_ANTENNAS_RX
+#  define NB_ANTENNAS_RX  4
+#endif
 #endif
 //