summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/stdlib.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/include/stdlib.h b/src/include/stdlib.h
index 9bc0ebc97b..2fc6805c73 100644
--- a/src/include/stdlib.h
+++ b/src/include/stdlib.h
@@ -26,4 +26,12 @@ void *malloc(size_t size);
static inline void free(void *ptr) {}
#endif
+#ifndef __ROMCC__
+static inline unsigned long div_round_up(unsigned int n, unsigned int d)
+{
+ return (n + d - 1) / d;
+}
+#endif
+
+
#endif /* STDLIB_H */