Index: uspace/lib/softint/generic/division.c
===================================================================
--- uspace/lib/softint/generic/division.c	(revision 5a6a42f4d0f7e33bc079117b49c6e2ad4840ea1c)
+++ uspace/lib/softint/generic/division.c	(revision 311929ece96bf4dc6018e75e0d12e512b9e541e4)
@@ -188,4 +188,18 @@
 }
 
+int __divmodsi3(int a, int b, int *c)
+{
+	unsigned int rem;
+	int result = (int) divandmod32(ABSVAL(a), ABSVAL(b), &rem);
+	
+	if (SGN(a) == SGN(b)) {
+		*c = rem;
+		return result;
+	}
+	
+	*c = -rem;
+	return -result;
+}
+
 unsigned int __udivmodsi3(unsigned int a, unsigned int b,
     unsigned int *c)
@@ -194,4 +208,18 @@
 }
 
+long long __divmoddi3(long long a, long long b, long long *c)
+{
+	unsigned long long rem;
+	long long result = (int) divandmod64(ABSVAL(a), ABSVAL(b), &rem);
+	
+	if (SGN(a) == SGN(b)) {
+		*c = rem;
+		return result;
+	}
+	
+	*c = -rem;
+	return -result;
+}
+
 unsigned long long __udivmoddi3(unsigned long long a, unsigned long long b,
     unsigned long long *c)
