From: Chris Johns <chr...@rtems.org>

---
 rtemsbsd/ptpd/src/dep/sys.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/rtemsbsd/ptpd/src/dep/sys.c b/rtemsbsd/ptpd/src/dep/sys.c
index b5831701..6c93bf4c 100644
--- a/rtemsbsd/ptpd/src/dep/sys.c
+++ b/rtemsbsd/ptpd/src/dep/sys.c
@@ -2668,3 +2668,19 @@ int setCpuAffinity(int cpu) {
 return -1;
 
 }
+
+#if __rtems__
+void *malloc (size_t n);
+
+/* Allocate an N-byte block of memory from the heap.
+   If N is zero, allocate a 1-byte block.  */
+
+void *
+rpl_malloc (size_t n)
+{
+  if (n == 0)
+    n = 1;
+  return malloc (n);
+}
+
+#endif /* __rtems__ */
-- 
2.25.1

_______________________________________________
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Reply via email to