diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2012-10-13 11:01:46 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2012-10-13 11:01:46 +0000 |
commit | 5ababb428ed64df5b7831687a6ad7f9dec5655a6 (patch) | |
tree | 45e38eed193886437e007823e4a617d3ccc4bb25 /os/various | |
parent | c78662c143424c4f5581b9e641d45ec75f06d704 (diff) | |
download | ChibiOS-5ababb428ed64df5b7831687a6ad7f9dec5655a6.tar.gz ChibiOS-5ababb428ed64df5b7831687a6ad7f9dec5655a6.tar.bz2 ChibiOS-5ababb428ed64df5b7831687a6ad7f9dec5655a6.zip |
Fixed bug 3576771.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4758 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/various')
-rw-r--r-- | os/various/syscalls.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/os/various/syscalls.c b/os/various/syscalls.c index 7cc98b5ea..252028c7f 100644 --- a/os/various/syscalls.c +++ b/os/various/syscalls.c @@ -133,6 +133,7 @@ int _close_r(struct _reent *r, int file) caddr_t _sbrk_r(struct _reent *r, int incr)
{
+#if CH_USE_MEMCORE
void *p;
chDbgCheck(incr > 0, "_sbrk_r");
@@ -144,6 +145,10 @@ caddr_t _sbrk_r(struct _reent *r, int incr) return (caddr_t)-1;
}
return (caddr_t)p;
+#else
+ __errno_r(r) = ENOMEM;
+ return (caddr_t)-1;
+#endif
}
/***************************************************************************/
|