Index: uspace/lib/c/generic/getopt.c
===================================================================
--- uspace/lib/c/generic/getopt.c	(revision 393302009dc835da26285d65656e166c29b4540f)
+++ uspace/lib/c/generic/getopt.c	(revision ba2901865c3ab8afb4340d521a9d32f8d12af447)
@@ -49,5 +49,5 @@
 int	optopt = '?';		/* character checked for validity */
 int	optreset;		/* reset getopt */
-const char *optarg;		/* argument associated with option */
+char	*optarg;		/* argument associated with option */
 
 
@@ -67,5 +67,5 @@
 #define INORDER (int)1
 
-#define	EMSG	""
+static char EMSG[] = "";
 
 static int getopt_internal(int, char **, const char *);
@@ -73,5 +73,5 @@
 static void permute_args(int, int, int, char **);
 
-static const char *place = EMSG; /* option letter processing */
+static char *place = EMSG; /* option letter processing */
 
 /* XXX: set optreset to 1 rather than these two */
@@ -336,5 +336,5 @@
 	if (retval == -2) {
 		char *current_argv;
-		const char *has_equal;
+		char *has_equal;
 		size_t current_argv_len;
 		int i, ambiguous, match;
Index: uspace/lib/c/include/getopt.h
===================================================================
--- uspace/lib/c/include/getopt.h	(revision 393302009dc835da26285d65656e166c29b4540f)
+++ uspace/lib/c/include/getopt.h	(revision ba2901865c3ab8afb4340d521a9d32f8d12af447)
@@ -57,5 +57,5 @@
 
 /* HelenOS Port - These need to be exposed for legacy getopt() */
-extern const char *optarg;
+extern char *optarg;
 extern int optind, opterr, optopt;
 extern int optreset;
