diff options
author | Ivan Zorin <[email protected]> | 2024-08-22 01:16:03 +0300 |
---|---|---|
committer | GitHub <[email protected]> | 2024-08-22 08:16:03 +1000 |
commit | 6305093b642845d410e1ea3cec3cba4ad134d449 (patch) | |
tree | 0d29a7fc5e9ac1d5efeec4844ab08e0a7c02806b /source | |
parent | 02b21a620bd810052d9f69e54a058270b730ceb9 (diff) | |
download | IronOS-6305093b642845d410e1ea3cec3cba4ad134d449.tar.gz IronOS-6305093b642845d410e1ea3cec3cba4ad134d449.zip |
Add stub implementations of unused syscalls explicitly (#1966)
Diffstat (limited to 'source')
-rw-r--r-- | source/Core/Src/syscalls.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source/Core/Src/syscalls.c b/source/Core/Src/syscalls.c index b1cefd18..8d8557ca 100644 --- a/source/Core/Src/syscalls.c +++ b/source/Core/Src/syscalls.c @@ -11,4 +11,14 @@ /* Functions */
void initialise_monitor_handles() {}
+/* Syscalls (stub implementations to avoid compile warnings and possibe future problems) */
int _getpid(void) { return 1; }
+
+#if defined(MODEL_Pinecil) || defined(MODEL_Pinecilv2)
+// do nothing here because some stubs and real implementations added for Pinecils already
+#else
+off_t _lseek(int fd, off_t ptr, int dir) { return -1; }
+ssize_t _read(int fd, void *ptr, size_t len) { return -1; }
+ssize_t _write(int fd, const void *ptr, size_t len) { return -1; }
+int _close(int fd) { return -1; }
+#endif
|