Add POLARSSL_DEPRECATED_{WARNING,REMOVED}
diff --git a/include/polarssl/memory.h b/include/polarssl/memory.h
index 8312beb..8b8ac5d 100644
--- a/include/polarssl/memory.h
+++ b/include/polarssl/memory.h
@@ -37,16 +37,26 @@
 #include "platform.h"
 #include "memory_buffer_alloc.h"
 
+#if ! defined(POLARSSL_DEPRECATED_REMOVED)
+#if defined(POLARSSL_DEPRECATED_WARNING)
+#define DEPRECATED    __attribute__((deprecated))
+#else
+#define DEPRECATED
+#endif
 /**
  * \brief   Set malloc() / free() callback
  *
  * \deprecated Use platform_set_malloc_free instead
  */
 int memory_set_own( void * (*malloc_func)( size_t ),
+                    void (*free_func)( void * ) ) DEPRECATED;
+int memory_set_own( void * (*malloc_func)( size_t ),
                     void (*free_func)( void * ) )
 {
     return platform_set_malloc_free( malloc_func, free_func );
 }
+#undef DEPRECATED
+#endif /* POLARSSL_DEPRECATED_REMOVED */
 
 
 #endif /* memory.h */