Index: /trunk/Config.kmk
===================================================================
--- /trunk/Config.kmk	(revision 31251)
+++ /trunk/Config.kmk	(revision 31252)
@@ -3991,5 +3991,5 @@
 TEMPLATE_VBOXGUESTR3XORGMOD_LIBS.$(KBUILD_TARGET)   = $(NO_SUCH_VARIABLE)
 TEMPLATE_VBOXGUESTR3XORGMOD_CFLAGS                  = $(TEMPLATE_VBOXGUESTR3DLL_CFLAGS) -std=c99
-TEMPLATE_VBOXGUESTR3XORGMOD_DEFS = $(TEMPLATE_VBOXGUESTR3DLL_DEFS) LOG_TO_BACKDOOR VBOX_GUESTR3XORGMOD RTMEM_NO_WRAP_TO_EF_APIS
+TEMPLATE_VBOXGUESTR3XORGMOD_DEFS = $(TEMPLATE_VBOXGUESTR3DLL_DEFS) LOG_TO_BACKDOOR VBOX_GUESTR3XORGMOD
 ifeq ($(KBUILD_TARGET_ARCH),amd64)
  TEMPLATE_VBOXGUESTR3XORGMOD_DEFS += _XSERVER64
Index: /trunk/include/iprt/mem.h
===================================================================
--- /trunk/include/iprt/mem.h	(revision 31251)
+++ /trunk/include/iprt/mem.h	(revision 31252)
@@ -818,5 +818,5 @@
 template <class T,
           void Destruct(T *) = RTMemAutoDestructor<T>,
-# ifdef RTMEM_WRAP_TO_EF_APIS
+# if defined(RTMEM_WRAP_TO_EF_APIS) && !defined(RTMEM_NO_WRAP_TO_EF_APIS)
           void *Allocator(void *, size_t, const char *) = RTMemEfReallocNP
 # else
Index: /trunk/src/VBox/Additions/x11/vboxmouse/undefined_15
===================================================================
--- /trunk/src/VBox/Additions/x11/vboxmouse/undefined_15	(revision 31251)
+++ /trunk/src/VBox/Additions/x11/vboxmouse/undefined_15	(revision 31252)
@@ -97,2 +97,7 @@
 sigfillset
 pthread_sigmask
+mprotect
+mmap64
+memalign
+posix_memalign
+munmap
Index: /trunk/src/VBox/Additions/x11/vboxmouse/undefined_70
===================================================================
--- /trunk/src/VBox/Additions/x11/vboxmouse/undefined_70	(revision 31251)
+++ /trunk/src/VBox/Additions/x11/vboxmouse/undefined_70	(revision 31252)
@@ -148,2 +148,7 @@
 sigfillset
 pthread_sigmask
+mprotect
+mmap64
+memalign
+posix_memalign
+munmap
Index: /trunk/src/VBox/Additions/x11/vboxmouse/undefined_71
===================================================================
--- /trunk/src/VBox/Additions/x11/vboxmouse/undefined_71	(revision 31251)
+++ /trunk/src/VBox/Additions/x11/vboxmouse/undefined_71	(revision 31252)
@@ -146,2 +146,7 @@
 sigfillset
 pthread_sigmask
+mprotect
+mmap64
+memalign
+posix_memalign
+munmap
Index: /trunk/src/VBox/Additions/x11/vboxvideo/undefined_13
===================================================================
--- /trunk/src/VBox/Additions/x11/vboxvideo/undefined_13	(revision 31251)
+++ /trunk/src/VBox/Additions/x11/vboxvideo/undefined_13	(revision 31252)
@@ -184,2 +184,7 @@
 sigfillset
 pthread_sigmask
+mprotect
+mmap64
+memalign
+posix_memalign
+munmap
Index: /trunk/src/VBox/Additions/x11/vboxvideo/undefined_70
===================================================================
--- /trunk/src/VBox/Additions/x11/vboxvideo/undefined_70	(revision 31251)
+++ /trunk/src/VBox/Additions/x11/vboxvideo/undefined_70	(revision 31252)
@@ -187,2 +187,7 @@
 sigfillset
 pthread_sigmask
+mprotect
+mmap64
+memalign
+posix_memalign
+munmap
Index: /trunk/src/VBox/Runtime/Makefile.kmk
===================================================================
--- /trunk/src/VBox/Runtime/Makefile.kmk	(revision 31251)
+++ /trunk/src/VBox/Runtime/Makefile.kmk	(revision 31252)
@@ -876,5 +876,7 @@
 RuntimeGuestR3Mini_INST                     := $(INST_ADDITIONS_LIB)
 RuntimeGuestR3Mini_SDKS.win                 := $(RuntimeR3_SDKS.win)
-RuntimeGuestR3Mini_DEFS                     := $(filter-out RTCRITSECT_STRICT RT_NO_GIP RT_WITH_ICONV_CACHE, $(RuntimeR3_DEFS)) RT_MINI
+RuntimeGuestR3Mini_DEFS                     := \
+	$(filter-out RTCRITSECT_STRICT RT_NO_GIP RT_WITH_ICONV_CACHE, $(RuntimeR3_DEFS)) \
+	RT_MINI
 RuntimeGuestR3Mini_DEFS.$(KBUILD_TARGET)    := $(RuntimeR3_DEFS.$(KBUILD_TARGET))
 RuntimeGuestR3Mini_DEFS.$(KBUILD_HOST)      := $(RuntimeR3_DEFS.$(KBUILD_HOST))
Index: /trunk/src/VBox/Runtime/r3/alloc-ef-cpp.cpp
===================================================================
--- /trunk/src/VBox/Runtime/r3/alloc-ef-cpp.cpp	(revision 31251)
+++ /trunk/src/VBox/Runtime/r3/alloc-ef-cpp.cpp	(revision 31252)
@@ -30,5 +30,6 @@
 #include "alloc-ef.h"
 
-#if defined(RTALLOC_EFENCE_CPP) || defined(RTMEM_WRAP_TO_EF_APIS) /* rest of the file */
+#if defined(RTALLOC_EFENCE_CPP) \
+ || (defined(RTMEM_WRAP_TO_EF_APIS) && !defined(RTMEM_NO_WRAP_TO_EF_APIS)) /* rest of the file */
 
 #include <iprt/asm.h>
Index: /trunk/src/VBox/Runtime/r3/alloc.cpp
===================================================================
--- /trunk/src/VBox/Runtime/r3/alloc.cpp	(revision 31251)
+++ /trunk/src/VBox/Runtime/r3/alloc.cpp	(revision 31252)
@@ -29,5 +29,5 @@
 *   Defined Constants And Macros                                               *
 *******************************************************************************/
-#ifdef RTMEM_WRAP_TO_EF_APIS
+#if defined(RTMEM_WRAP_TO_EF_APIS) && !defined(RTMEM_NO_WRAP_TO_EF_APIS)
 # undef RTMEM_WRAP_TO_EF_APIS
 # define RTALLOC_USE_EFENCE 1
