[rtems commit] Avoid need for -fno-builtin for calloc()
Sebastian Huber
sebh at rtems.org
Thu Oct 4 08:51:22 UTC 2018
Module: rtems
Branch: master
Commit: 1ad43f8809882b9a281a4f7c8fe232e87ea4371f
Changeset: http://git.rtems.org/rtems/commit/?id=1ad43f8809882b9a281a4f7c8fe232e87ea4371f
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Thu Sep 13 14:49:16 2018 +0200
Avoid need for -fno-builtin for calloc()
Use RTEMS_OBFUSCATE_VARIABLE() instead.
---
cpukit/libcsupport/src/calloc.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/cpukit/libcsupport/src/calloc.c b/cpukit/libcsupport/src/calloc.c
index 915ece3..20db533 100644
--- a/cpukit/libcsupport/src/calloc.c
+++ b/cpukit/libcsupport/src/calloc.c
@@ -21,6 +21,7 @@
#if defined(RTEMS_NEWLIB) && !defined(HAVE_CALLOC)
#include <stdlib.h>
#include <string.h>
+#include <rtems/score/basedefs.h>
void *calloc(
size_t nelem,
@@ -32,6 +33,7 @@ void *calloc(
length = nelem * elsize;
cptr = malloc( length );
+ RTEMS_OBFUSCATE_VARIABLE( cptr );
if ( cptr )
memset( cptr, '\0', length );
More information about the vc
mailing list