diff options
-rw-r--r-- | ndb/src/common/portlib/gcc.cpp | 2 | ||||
-rw-r--r-- | ndb/src/common/util/new.cpp | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/ndb/src/common/portlib/gcc.cpp b/ndb/src/common/portlib/gcc.cpp index 41b1373ee78..66aa4812dc6 100644 --- a/ndb/src/common/portlib/gcc.cpp +++ b/ndb/src/common/portlib/gcc.cpp @@ -2,6 +2,6 @@ /** * GCC linking problem... */ -#if ( __GNUC__ == 3 ) +#ifdef DEFINE_CXA_PURE_VIRTUAL extern "C" { int __cxa_pure_virtual() { return 0;} } #endif diff --git a/ndb/src/common/util/new.cpp b/ndb/src/common/util/new.cpp index 889e83edf6f..b61541b7474 100644 --- a/ndb/src/common/util/new.cpp +++ b/ndb/src/common/util/new.cpp @@ -5,6 +5,8 @@ extern "C" { void (* ndb_new_handler)() = 0; } +#ifdef USE_MYSYS_NEW + void *operator new (size_t sz) { void * p = malloc (sz ? sz : 1); @@ -36,3 +38,5 @@ void operator delete[] (void *ptr) throw () if (ptr) free(ptr); } + +#endif // USE_MYSYS_NEW |