Code drop from //branches/cupcake/...@124589
diff --git a/libc/include/stdlib.h b/libc/include/stdlib.h
index ff3c1f7..15925e3 100644
--- a/libc/include/stdlib.h
+++ b/libc/include/stdlib.h
@@ -134,6 +134,32 @@
   return 0;     /* devpts does this all for us! */
 }
 
+typedef struct {
+    int  quot;
+    int  rem;
+} div_t;
+
+extern div_t   div(int, int);
+
+typedef struct {
+    long int  quot;
+    long int  rem;
+} ldiv_t;
+
+extern ldiv_t   ldiv(long, long);
+
+typedef struct {
+    long long int  quot;
+    long long int  rem;
+} lldiv_t;
+
+extern lldiv_t   lldiv(long long, long long);
+
+/* make STLPort happy */
+extern int      mblen(const char *, size_t);
+extern size_t   mbstowcs(wchar_t *, const char *, size_t);
+extern int      mbtowc(wchar_t *, const char *, size_t);
+
 __END_DECLS
 
 #endif /* _STDLIB_H_ */