diff --git a/include/ndnboost/smart_ptr/scoped_ptr.hpp b/include/ndnboost/smart_ptr/scoped_ptr.hpp
index 7ee252b..d79b393 100644
--- a/include/ndnboost/smart_ptr/scoped_ptr.hpp
+++ b/include/ndnboost/smart_ptr/scoped_ptr.hpp
@@ -1,5 +1,5 @@
-#ifndef BOOST_SMART_PTR_SCOPED_PTR_HPP_INCLUDED
-#define BOOST_SMART_PTR_SCOPED_PTR_HPP_INCLUDED
+#ifndef NDNBOOST_SMART_PTR_SCOPED_PTR_HPP_INCLUDED
+#define NDNBOOST_SMART_PTR_SCOPED_PTR_HPP_INCLUDED
 
 //  (C) Copyright Greg Colvin and Beman Dawes 1998, 1999.
 //  Copyright (c) 2001, 2002 Peter Dimov
@@ -17,7 +17,7 @@
 #include <ndnboost/smart_ptr/detail/sp_nullptr_t.hpp>
 #include <ndnboost/detail/workaround.hpp>
 
-#ifndef BOOST_NO_AUTO_PTR
+#ifndef NDNBOOST_NO_AUTO_PTR
 # include <memory>          // for std::auto_ptr
 #endif
 
@@ -26,7 +26,7 @@
 
 // Debug hooks
 
-#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
+#if defined(NDNBOOST_SP_ENABLE_DEBUG_HOOKS)
 
 void sp_scalar_constructor_hook(void * p);
 void sp_scalar_destructor_hook(void * p);
@@ -58,16 +58,16 @@
 
     explicit scoped_ptr( T * p = 0 ): px( p ) // never throws
     {
-#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
+#if defined(NDNBOOST_SP_ENABLE_DEBUG_HOOKS)
         ndnboost::sp_scalar_constructor_hook( px );
 #endif
     }
 
-#ifndef BOOST_NO_AUTO_PTR
+#ifndef NDNBOOST_NO_AUTO_PTR
 
-    explicit scoped_ptr( std::auto_ptr<T> p ) BOOST_NOEXCEPT : px( p.release() )
+    explicit scoped_ptr( std::auto_ptr<T> p ) NDNBOOST_NOEXCEPT : px( p.release() )
     {
-#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
+#if defined(NDNBOOST_SP_ENABLE_DEBUG_HOOKS)
         ndnboost::sp_scalar_constructor_hook( px );
 #endif
     }
@@ -76,7 +76,7 @@
 
     ~scoped_ptr() // never throws
     {
-#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
+#if defined(NDNBOOST_SP_ENABLE_DEBUG_HOOKS)
         ndnboost::sp_scalar_destructor_hook( px );
 #endif
         ndnboost::checked_delete( px );
@@ -84,23 +84,23 @@
 
     void reset(T * p = 0) // never throws
     {
-        BOOST_ASSERT( p == 0 || p != px ); // catch self-reset errors
+        NDNBOOST_ASSERT( p == 0 || p != px ); // catch self-reset errors
         this_type(p).swap(*this);
     }
 
     T & operator*() const // never throws
     {
-        BOOST_ASSERT( px != 0 );
+        NDNBOOST_ASSERT( px != 0 );
         return *px;
     }
 
     T * operator->() const // never throws
     {
-        BOOST_ASSERT( px != 0 );
+        NDNBOOST_ASSERT( px != 0 );
         return px;
     }
 
-    T * get() const BOOST_NOEXCEPT
+    T * get() const NDNBOOST_NOEXCEPT
     {
         return px;
     }
@@ -108,7 +108,7 @@
 // implicit conversion to "bool"
 #include <ndnboost/smart_ptr/detail/operator_bool.hpp>
 
-    void swap(scoped_ptr & b) BOOST_NOEXCEPT
+    void swap(scoped_ptr & b) NDNBOOST_NOEXCEPT
     {
         T * tmp = b.px;
         b.px = px;
@@ -116,42 +116,42 @@
     }
 };
 
-#if !defined( BOOST_NO_CXX11_NULLPTR )
+#if !defined( NDNBOOST_NO_CXX11_NULLPTR )
 
-template<class T> inline bool operator==( scoped_ptr<T> const & p, ndnboost::detail::sp_nullptr_t ) BOOST_NOEXCEPT
+template<class T> inline bool operator==( scoped_ptr<T> const & p, ndnboost::detail::sp_nullptr_t ) NDNBOOST_NOEXCEPT
 {
     return p.get() == 0;
 }
 
-template<class T> inline bool operator==( ndnboost::detail::sp_nullptr_t, scoped_ptr<T> const & p ) BOOST_NOEXCEPT
+template<class T> inline bool operator==( ndnboost::detail::sp_nullptr_t, scoped_ptr<T> const & p ) NDNBOOST_NOEXCEPT
 {
     return p.get() == 0;
 }
 
-template<class T> inline bool operator!=( scoped_ptr<T> const & p, ndnboost::detail::sp_nullptr_t ) BOOST_NOEXCEPT
+template<class T> inline bool operator!=( scoped_ptr<T> const & p, ndnboost::detail::sp_nullptr_t ) NDNBOOST_NOEXCEPT
 {
     return p.get() != 0;
 }
 
-template<class T> inline bool operator!=( ndnboost::detail::sp_nullptr_t, scoped_ptr<T> const & p ) BOOST_NOEXCEPT
+template<class T> inline bool operator!=( ndnboost::detail::sp_nullptr_t, scoped_ptr<T> const & p ) NDNBOOST_NOEXCEPT
 {
     return p.get() != 0;
 }
 
 #endif
 
-template<class T> inline void swap(scoped_ptr<T> & a, scoped_ptr<T> & b) BOOST_NOEXCEPT
+template<class T> inline void swap(scoped_ptr<T> & a, scoped_ptr<T> & b) NDNBOOST_NOEXCEPT
 {
     a.swap(b);
 }
 
 // get_pointer(p) is a generic way to say p.get()
 
-template<class T> inline T * get_pointer(scoped_ptr<T> const & p) BOOST_NOEXCEPT
+template<class T> inline T * get_pointer(scoped_ptr<T> const & p) NDNBOOST_NOEXCEPT
 {
     return p.get();
 }
 
 } // namespace ndnboost
 
-#endif // #ifndef BOOST_SMART_PTR_SCOPED_PTR_HPP_INCLUDED
+#endif // #ifndef NDNBOOST_SMART_PTR_SCOPED_PTR_HPP_INCLUDED
