Index: uspace/lib/libc/generic/string.c
===================================================================
--- uspace/lib/libc/generic/string.c	(revision 39463ff49ad84582d10c6fd17af2ab4616d628ef)
+++ uspace/lib/libc/generic/string.c	(revision 69df837ff0f09e652790af54b3ba894e57e17b73)
@@ -1,4 +1,6 @@
 /*
  * Copyright (c) 2005 Martin Decky
+ * Copyright (C) 1998 by Wes Peters <wes@softweyr.com>
+ * Copyright (c) 1988, 1993 The Regents of the University of California.
  * All rights reserved.
  *
@@ -397,4 +399,51 @@
 }
 
+/* Ported from FBSD strtok.c 8.1 (Berkeley) 6/4/93 */
+char * strtok_r(char *s, const char *delim, char **last)
+{
+	char *spanp, *tok;
+	int c, sc;
+
+	if (s == NULL && (s = *last) == NULL)
+		return (NULL);
+
+cont:
+	c = *s++;
+	for (spanp = (char *)delim; (sc = *spanp++) != 0;) {
+		if (c == sc)
+			goto cont;
+	}
+
+	if (c == 0) {		/* no non-delimiter characters */
+		*last = NULL;
+		return (NULL);
+	}
+
+	tok = s - 1;
+
+	for (;;) {
+		c = *s++;
+		spanp = (char *)delim;
+		do {
+			if ((sc = *spanp++) == c) {
+				if (c == 0)
+					s = NULL;
+				else
+					s[-1] = '\0';
+				*last = s;
+				return (tok);
+			}
+		} while (sc != 0);
+	}
+}
+
+/* Ported from FBSD strtok.c 8.1 (Berkeley) 6/4/93 */
+char * strtok(char *s, const char *delim)
+{
+	static char *last;
+
+	return (strtok_r(s, delim, &last));
+}
+
 /** @}
  */
Index: uspace/lib/libc/include/string.h
===================================================================
--- uspace/lib/libc/include/string.h	(revision 39463ff49ad84582d10c6fd17af2ab4616d628ef)
+++ uspace/lib/libc/include/string.h	(revision 69df837ff0f09e652790af54b3ba894e57e17b73)
@@ -65,4 +65,7 @@
 extern unsigned long strtoul(const char *, char **, int);
 
+extern char * strtok_r(char *, const char *, char **);
+extern char * strtok(char *, const char *);
+
 #endif
 
