From 1e0bb5d51c2e96b41a4e2ef7216808cf4e6b457d Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Mon, 13 Aug 2012 12:39:37 +0200 Subject: [PATCH] Build fix for FreeBSD. --- base/dynamicobject.h | 8 +++++++- base/scriptfunction.h | 3 ++- base/unix.h | 1 + 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/base/dynamicobject.h b/base/dynamicobject.h index d0a459ca9..025959b2f 100644 --- a/base/dynamicobject.h +++ b/base/dynamicobject.h @@ -155,8 +155,14 @@ public: } }; +template +shared_ptr DynamicObjectFactory(const Dictionary::Ptr& serializedUpdate) +{ + return boost::make_shared(serializedUpdate); +} + #define REGISTER_CLASS(klass) \ - static RegisterClassHelper g_Register ## klass(#klass, boost::make_shared) + static RegisterClassHelper g_Register ## klass(#klass, DynamicObjectFactory) } diff --git a/base/scriptfunction.h b/base/scriptfunction.h index da348c386..94bbc7138 100644 --- a/base/scriptfunction.h +++ b/base/scriptfunction.h @@ -49,4 +49,5 @@ private: } -#endif /* SCRIPTFUNCTION_H */ \ No newline at end of file +#endif /* SCRIPTFUNCTION_H */ + diff --git a/base/unix.h b/base/unix.h index 0e790f2b2..31e5ae9c0 100644 --- a/base/unix.h +++ b/base/unix.h @@ -35,6 +35,7 @@ #include #include #include +#include void Sleep(unsigned long milliseconds); -- 2.40.0