Index: uspace/app/bdsh/compl.c
===================================================================
--- uspace/app/bdsh/compl.c	(revision d39c46e03cdf4c2a6b309cc0244b5bf42b3b6000)
+++ uspace/app/bdsh/compl.c	(revision 33b8d024bc268f2773c26e74a40dada11bb71e58)
@@ -69,7 +69,7 @@
 
 	/** Pointer inside list of directories */
-	const char **path;
+	const char *const *path;
 	/** If not @c NULL, should be freed in the end. */
-	const char **path_list;
+	char **path_list;
 	/** Current open directory */
 	DIR *dir;
@@ -219,5 +219,7 @@
 		cs->path_list[0] = dirname;
 		cs->path_list[1] = NULL;
-		cs->path = cs->path_list;
+		/* The second const ensures that we can't assign a const
+		 * string to the non-const array. */
+		cs->path = (const char *const *) cs->path_list;
 
 	} else if (cs->is_command) {
Index: uspace/app/edit/search_impl.h
===================================================================
--- uspace/app/edit/search_impl.h	(revision d39c46e03cdf4c2a6b309cc0244b5bf42b3b6000)
+++ uspace/app/edit/search_impl.h	(revision 33b8d024bc268f2773c26e74a40dada11bb71e58)
@@ -43,5 +43,5 @@
 	/* Note: This structure is opaque for the user. */
 
-	const wchar_t *pattern;
+	wchar_t *pattern;
 	size_t pattern_length;
 	ssize_t *back_table;
Index: uspace/app/mixerctl/mixerctl.c
===================================================================
--- uspace/app/mixerctl/mixerctl.c	(revision d39c46e03cdf4c2a6b309cc0244b5bf42b3b6000)
+++ uspace/app/mixerctl/mixerctl.c	(revision 33b8d024bc268f2773c26e74a40dada11bb71e58)
@@ -49,5 +49,5 @@
 static void print_levels(async_exch_t *exch)
 {
-	const char* name = NULL;
+	char* name = NULL;
 	unsigned count = 0;
 	errno_t ret = audio_mixer_get_info(exch, &name, &count);
@@ -59,5 +59,5 @@
 
 	for (unsigned i = 0; i < count; ++i) {
-		const char *name = NULL;
+		char *name = NULL;
 		unsigned levels = 0, current = 0;
 		errno_t ret =
Index: uspace/app/wavplay/dplay.c
===================================================================
--- uspace/app/wavplay/dplay.c	(revision d39c46e03cdf4c2a6b309cc0244b5bf42b3b6000)
+++ uspace/app/wavplay/dplay.c	(revision 33b8d024bc268f2773c26e74a40dada11bb71e58)
@@ -353,5 +353,5 @@
 	}
 
-	const char* info = NULL;
+	char* info = NULL;
 	ret = audio_pcm_get_info_str(session, &info);
 	if (ret != EOK) {
Index: uspace/app/wavplay/drec.c
===================================================================
--- uspace/app/wavplay/drec.c	(revision d39c46e03cdf4c2a6b309cc0244b5bf42b3b6000)
+++ uspace/app/wavplay/drec.c	(revision 33b8d024bc268f2773c26e74a40dada11bb71e58)
@@ -195,5 +195,5 @@
 	}
 
-	const char* info = NULL;
+	char* info = NULL;
 	ret = audio_pcm_get_info_str(session, &info);
 	if (ret != EOK) {
Index: uspace/drv/bus/usb/vhc/hub/virthub.c
===================================================================
--- uspace/drv/bus/usb/vhc/hub/virthub.c	(revision d39c46e03cdf4c2a6b309cc0244b5bf42b3b6000)
+++ uspace/drv/bus/usb/vhc/hub/virthub.c	(revision 33b8d024bc268f2773c26e74a40dada11bb71e58)
@@ -156,14 +156,16 @@
 	dev->descriptors = &descriptors;
 	dev->address = 0;
-	dev->name = str_dup(name);
-	if (!dev->name)
+
+	char *n = str_dup(name);
+	if (!n)
 		return ENOMEM;
 
 	hub_t *hub = malloc(sizeof(hub_t));
 	if (hub == NULL) {
-		free(dev->name);
+		free(n);
 		return ENOMEM;
 	}
 
+	dev->name = n;
 	hub_init(hub);
 	dev->device_data = hub;
Index: uspace/drv/platform/amdm37x/main.c
===================================================================
--- uspace/drv/platform/amdm37x/main.c	(revision d39c46e03cdf4c2a6b309cc0244b5bf42b3b6000)
+++ uspace/drv/platform/amdm37x/main.c	(revision 33b8d024bc268f2773c26e74a40dada11bb71e58)
@@ -49,5 +49,6 @@
 typedef struct {
 	const char *name;
-	match_id_t match_id;
+	const char *id;
+	int score;
 	hw_resource_list_t hw_resources;
 } amdm37x_fun_t;
@@ -133,15 +134,18 @@
 {
 	.name = "ohci",
-	.match_id = { .id = "usb/host=ohci", .score = 90 },
+	.id = "usb/host=ohci",
+	.score = 90,
 	.hw_resources = { .resources = ohci_res, .count = ARRAY_SIZE(ohci_res) }
 },
 {
 	.name = "ehci",
-	.match_id = { .id = "usb/host=ehci", .score = 90 },
+	.id = "usb/host=ehci",
+	.score = 90,
 	.hw_resources = { .resources = ehci_res, .count = ARRAY_SIZE(ehci_res) }
 },
 {
 	.name = "fb",
-	.match_id = { .id = "amdm37x&dispc", .score = 90 },
+	.id = "amdm37x&dispc",
+	.score = 90,
 	.hw_resources = { .resources = disp_res, .count = ARRAY_SIZE(disp_res) }
 },
@@ -174,6 +178,5 @@
 	
 	/* Add match id */
-	errno_t ret = ddf_fun_add_match_id(fnode,
-	    fun->match_id.id, fun->match_id.score);
+	errno_t ret = ddf_fun_add_match_id(fnode, fun->id, fun->score);
 	if (ret != EOK) {
 		ddf_fun_destroy(fnode);
Index: uspace/lib/c/generic/malloc.c
===================================================================
--- uspace/lib/c/generic/malloc.c	(revision d39c46e03cdf4c2a6b309cc0244b5bf42b3b6000)
+++ uspace/lib/c/generic/malloc.c	(revision 33b8d024bc268f2773c26e74a40dada11bb71e58)
@@ -874,5 +874,5 @@
  *
  */
-void *realloc(const void *addr, const size_t size)
+void *realloc(void * const addr, const size_t size)
 {
 	if (size == 0) {
@@ -988,5 +988,5 @@
  *
  */
-void free(const void *addr)
+void free(void * const addr)
 {
 	if (addr == NULL)
Index: uspace/lib/c/include/ipc/devman.h
===================================================================
--- uspace/lib/c/include/ipc/devman.h	(revision d39c46e03cdf4c2a6b309cc0244b5bf42b3b6000)
+++ uspace/lib/c/include/ipc/devman.h	(revision 33b8d024bc268f2773c26e74a40dada11bb71e58)
@@ -74,5 +74,5 @@
 	/** Id of device model.
 	 */
-	const char *id;
+	char *id;
 	/** Relevancy of device-to-driver match.
 	 * The higher is the product of scores specified for the device by the bus driver and by the leaf driver,
Index: uspace/lib/c/include/malloc.h
===================================================================
--- uspace/lib/c/include/malloc.h	(revision d39c46e03cdf4c2a6b309cc0244b5bf42b3b6000)
+++ uspace/lib/c/include/malloc.h	(revision 33b8d024bc268f2773c26e74a40dada11bb71e58)
@@ -38,13 +38,13 @@
 #include <stddef.h>
 
-extern void *malloc(const size_t size)
+extern void *malloc(size_t size)
     __attribute__((malloc));
-extern void *calloc(const size_t nmemb, const size_t size)
+extern void *calloc(size_t nmemb, size_t size)
     __attribute__((malloc));
-extern void *memalign(const size_t align, const size_t size)
+extern void *memalign(size_t align, size_t size)
     __attribute__((malloc));
-extern void *realloc(const void *addr, const size_t size)
+extern void *realloc(void *addr, size_t size)
     __attribute__((warn_unused_result));
-extern void free(const void *addr);
+extern void free(void *addr);
 extern void *heap_check(void);
 
Index: uspace/lib/drv/generic/private/driver.h
===================================================================
--- uspace/lib/drv/generic/private/driver.h	(revision d39c46e03cdf4c2a6b309cc0244b5bf42b3b6000)
+++ uspace/lib/drv/generic/private/driver.h	(revision 33b8d024bc268f2773c26e74a40dada11bb71e58)
@@ -57,5 +57,5 @@
 	
 	/** Device name */
-	const char *name;
+	char *name;
 	
 	/** Driver-specific data associated with this device */
@@ -84,5 +84,5 @@
 	
 	/** Function name */
-	const char *name;
+	char *name;
 	
 	/** List of device ids for driver matching */
Index: uspace/lib/drv/generic/remote_audio_mixer.c
===================================================================
--- uspace/lib/drv/generic/remote_audio_mixer.c	(revision d39c46e03cdf4c2a6b309cc0244b5bf42b3b6000)
+++ uspace/lib/drv/generic/remote_audio_mixer.c	(revision 33b8d024bc268f2773c26e74a40dada11bb71e58)
@@ -94,5 +94,5 @@
  * @return Error code.
  */
-errno_t audio_mixer_get_info(async_exch_t *exch, const char **name, unsigned *items)
+errno_t audio_mixer_get_info(async_exch_t *exch, char **name, unsigned *items)
 {
 	if (!exch)
@@ -131,5 +131,5 @@
  */
 errno_t audio_mixer_get_item_info(async_exch_t *exch, unsigned item,
-    const char **name, unsigned *levels)
+    char **name, unsigned *levels)
 {
 	if (!exch)
Index: uspace/lib/drv/generic/remote_audio_pcm.c
===================================================================
--- uspace/lib/drv/generic/remote_audio_pcm.c	(revision d39c46e03cdf4c2a6b309cc0244b5bf42b3b6000)
+++ uspace/lib/drv/generic/remote_audio_pcm.c	(revision 33b8d024bc268f2773c26e74a40dada11bb71e58)
@@ -184,5 +184,5 @@
  * @note Caller is responsible for freeing newly allocated memory.
  */
-errno_t audio_pcm_get_info_str(audio_pcm_sess_t *sess, const char **name)
+errno_t audio_pcm_get_info_str(audio_pcm_sess_t *sess, char **name)
 {
 	if (!name)
Index: uspace/lib/drv/include/audio_mixer_iface.h
===================================================================
--- uspace/lib/drv/include/audio_mixer_iface.h	(revision d39c46e03cdf4c2a6b309cc0244b5bf42b3b6000)
+++ uspace/lib/drv/include/audio_mixer_iface.h	(revision 33b8d024bc268f2773c26e74a40dada11bb71e58)
@@ -43,7 +43,7 @@
 #include "ddf/driver.h"
 
-errno_t audio_mixer_get_info(async_exch_t *, const char **, unsigned *);
+errno_t audio_mixer_get_info(async_exch_t *, char **, unsigned *);
 errno_t audio_mixer_get_item_info(async_exch_t *, unsigned,
-    const char **, unsigned *);
+    char **, unsigned *);
 errno_t audio_mixer_get_item_level(async_exch_t *, unsigned, unsigned *);
 errno_t audio_mixer_set_item_level(async_exch_t *, unsigned, unsigned);
Index: uspace/lib/drv/include/audio_pcm_iface.h
===================================================================
--- uspace/lib/drv/include/audio_pcm_iface.h	(revision d39c46e03cdf4c2a6b309cc0244b5bf42b3b6000)
+++ uspace/lib/drv/include/audio_pcm_iface.h	(revision 33b8d024bc268f2773c26e74a40dada11bb71e58)
@@ -80,5 +80,5 @@
 void audio_pcm_close(audio_pcm_sess_t *);
 
-errno_t audio_pcm_get_info_str(audio_pcm_sess_t *, const char **);
+errno_t audio_pcm_get_info_str(audio_pcm_sess_t *, char **);
 errno_t audio_pcm_test_format(audio_pcm_sess_t *, unsigned *, unsigned *,
     pcm_sample_format_t *);
Index: uspace/lib/hound/include/hound/client.h
===================================================================
--- uspace/lib/hound/include/hound/client.h	(revision d39c46e03cdf4c2a6b309cc0244b5bf42b3b6000)
+++ uspace/lib/hound/include/hound/client.h	(revision 33b8d024bc268f2773c26e74a40dada11bb71e58)
@@ -57,7 +57,7 @@
 
 errno_t hound_context_get_available_targets(hound_context_t *hound,
-    const char ***names, size_t *count);
+    char ***names, size_t *count);
 errno_t hound_context_get_connected_targets(hound_context_t *hound,
-    const char ***names, size_t *count);
+    char ***names, size_t *count);
 
 errno_t hound_context_connect_target(hound_context_t *hound, const char* target);
Index: uspace/lib/hound/include/hound/protocol.h
===================================================================
--- uspace/lib/hound/include/hound/protocol.h	(revision d39c46e03cdf4c2a6b309cc0244b5bf42b3b6000)
+++ uspace/lib/hound/include/hound/protocol.h	(revision 33b8d024bc268f2773c26e74a40dada11bb71e58)
@@ -65,5 +65,5 @@
 errno_t hound_service_unregister_context(hound_sess_t *sess, hound_context_id_t id);
 
-errno_t hound_service_get_list(hound_sess_t *sess, const char ***ids, size_t *count,
+errno_t hound_service_get_list(hound_sess_t *sess, char ***ids, size_t *count,
     int flags, const char *connection);
 
@@ -77,5 +77,5 @@
  */
 static inline errno_t hound_service_get_list_all(hound_sess_t *sess,
-    const char ***ids, size_t *count, int flags)
+    char ***ids, size_t *count, int flags)
 {
 	return hound_service_get_list(sess, ids, count, flags, NULL);
@@ -106,5 +106,5 @@
 	bool (*is_record_context)(void *, hound_context_id_t);
 	/** Get string identifiers of specified objects */
-	errno_t (*get_list)(void *, const char ***, size_t *, const char *, int);
+	errno_t (*get_list)(void *, char ***, size_t *, const char *, int);
 	/** Create connection between source and sink */
 	errno_t (*connect)(void *, const char *, const char *);
Index: uspace/lib/hound/src/client.c
===================================================================
--- uspace/lib/hound/src/client.c	(revision d39c46e03cdf4c2a6b309cc0244b5bf42b3b6000)
+++ uspace/lib/hound/src/client.c	(revision 33b8d024bc268f2773c26e74a40dada11bb71e58)
@@ -76,5 +76,5 @@
 	hound_sess_t *session;
 	/** context name, reported to the daemon */
-	const char *name;
+	char *name;
 	/** True if the instance is record context */
 	bool record;
@@ -196,5 +196,5 @@
  */
 errno_t hound_context_get_available_targets(hound_context_t *hound,
-    const char ***names, size_t *count)
+    char ***names, size_t *count)
 {
 	assert(hound);
@@ -213,5 +213,5 @@
  */
 errno_t hound_context_get_connected_targets(hound_context_t *hound,
-    const char ***names, size_t *count)
+    char ***names, size_t *count)
 {
 	assert(hound);
@@ -237,5 +237,5 @@
 	assert(target);
 
-	const char **tgt = NULL;
+	char **tgt = NULL;
 	size_t count = 1;
 	errno_t ret = EOK;
Index: uspace/lib/hound/src/protocol.c
===================================================================
--- uspace/lib/hound/src/protocol.c	(revision d39c46e03cdf4c2a6b309cc0244b5bf42b3b6000)
+++ uspace/lib/hound/src/protocol.c	(revision 33b8d024bc268f2773c26e74a40dada11bb71e58)
@@ -173,5 +173,5 @@
  * @retval Error code.
  */
-errno_t hound_service_get_list(hound_sess_t *sess, const char ***ids, size_t *count,
+errno_t hound_service_get_list(hound_sess_t *sess, char ***ids, size_t *count,
     int flags, const char *connection)
 {
@@ -206,5 +206,5 @@
 
 	/* Start receiving names */
-	const char **names = NULL;
+	char **names = NULL;
 	if (name_count) {
 		size_t *sizes = calloc(name_count, sizeof(size_t));
@@ -446,5 +446,5 @@
 			}
 
-			const char **list = NULL;
+			char **list = NULL;
 			const int flags = IPC_GET_ARG1(call);
 			size_t count = IPC_GET_ARG2(call);
Index: uspace/lib/nic/include/nic.h
===================================================================
--- uspace/lib/nic/include/nic.h	(revision d39c46e03cdf4c2a6b309cc0244b5bf42b3b6000)
+++ uspace/lib/nic/include/nic.h	(revision 33b8d024bc268f2773c26e74a40dada11bb71e58)
@@ -57,5 +57,5 @@
 	nic_wv_id_t id;
 	nic_wv_type_t type;
-	const void *data;
+	void *data;
 	size_t length;
 	struct nic_wol_virtue *next;
Index: uspace/lib/posix/source/stdio/scanf.c
===================================================================
--- uspace/lib/posix/source/stdio/scanf.c	(revision d39c46e03cdf4c2a6b309cc0244b5bf42b3b6000)
+++ uspace/lib/posix/source/stdio/scanf.c	(revision 33b8d024bc268f2773c26e74a40dada11bb71e58)
@@ -625,6 +625,7 @@
 
 				const char *cur_borrowed = NULL;
+				char *cur_duplicated = NULL;
 				const char *cur_limited = NULL;
-				char *cur_updated = NULL;
+				const char *cur_updated = NULL;
 
 				/* Borrow the cursor. Until it is returned to the provider
@@ -637,9 +638,10 @@
 				 * than allowed by width. */
 				if (width != -1) {
-					cur_limited = posix_strndup(cur_borrowed, width);
+					cur_duplicated = posix_strndup(cur_borrowed, width);
+					cur_limited = cur_duplicated;
 				} else {
 					cur_limited = cur_borrowed;
 				}
-				cur_updated = (char *) cur_limited;
+				cur_updated = cur_limited;
 
 				long long sres = 0;
@@ -648,17 +650,18 @@
 				/* Try to convert the integer. */
 				if (int_conv_unsigned) {
-					ures = strtoull(cur_limited, &cur_updated, int_conv_base);
+					ures = strtoull(cur_limited, (char **) &cur_updated, int_conv_base);
 				} else {
-					sres = strtoll(cur_limited, &cur_updated, int_conv_base);
+					sres = strtoll(cur_limited, (char **) &cur_updated, int_conv_base);
 				}
 
 				/* Update the cursor so it can be returned to the provider. */
 				cur_borrowed += cur_updated - cur_limited;
-				if (width != -1 && cur_limited != NULL) {
+				if (cur_duplicated != NULL) {
 					/* Deallocate duplicated part of the cursor view. */
-					free(cur_limited);
+					free(cur_duplicated);
 				}
 				cur_limited = NULL;
 				cur_updated = NULL;
+				cur_duplicated = NULL;
 				/* Return the cursor to the provider. Input consistency is again
 				 * the job of the provider, so we can report errors from
@@ -797,5 +800,6 @@
 				const char *cur_borrowed = NULL;
 				const char *cur_limited = NULL;
-				char *cur_updated = NULL;
+				char *cur_duplicated = NULL;
+				const char *cur_updated = NULL;
 
 				/* Borrow the cursor. Until it is returned to the provider
@@ -808,9 +812,10 @@
 				 * than allowed by width. */
 				if (width != -1) {
-					cur_limited = posix_strndup(cur_borrowed, width);
+					cur_duplicated = posix_strndup(cur_borrowed, width);
+					cur_limited = cur_duplicated;
 				} else {
 					cur_limited = cur_borrowed;
 				}
-				cur_updated = (char *) cur_limited;
+				cur_updated = cur_limited;
 
 				float fres = 0.0;
@@ -821,11 +826,11 @@
 				switch (length_mod) {
 				case LMOD_NONE:
-					fres = posix_strtof(cur_limited, &cur_updated);
+					fres = posix_strtof(cur_limited, (char **) &cur_updated);
 					break;
 				case LMOD_l:
-					dres = posix_strtod(cur_limited, &cur_updated);
+					dres = posix_strtod(cur_limited, (char **) &cur_updated);
 					break;
 				case LMOD_L:
-					ldres = posix_strtold(cur_limited, &cur_updated);
+					ldres = posix_strtold(cur_limited, (char **) &cur_updated);
 					break;
 				default:
@@ -835,7 +840,7 @@
 				/* Update the cursor so it can be returned to the provider. */
 				cur_borrowed += cur_updated - cur_limited;
-				if (width != -1 && cur_limited != NULL) {
+				if (cur_duplicated != NULL) {
 					/* Deallocate duplicated part of the cursor view. */
-					free(cur_limited);
+					free(cur_duplicated);
 				}
 				cur_limited = NULL;
Index: uspace/lib/usbdev/include/usb/dev/alternate_ifaces.h
===================================================================
--- uspace/lib/usbdev/include/usb/dev/alternate_ifaces.h	(revision d39c46e03cdf4c2a6b309cc0244b5bf42b3b6000)
+++ uspace/lib/usbdev/include/usb/dev/alternate_ifaces.h	(revision 33b8d024bc268f2773c26e74a40dada11bb71e58)
@@ -59,5 +59,5 @@
 typedef struct {
 	/** Array of alternate interfaces descriptions. */
-	const usb_alternate_interface_descriptors_t *alternatives;
+	usb_alternate_interface_descriptors_t *alternatives;
 	/** Size of @c alternatives array. */
 	size_t alternative_count;
Index: uspace/lib/usbdev/include/usb/dev/device.h
===================================================================
--- uspace/lib/usbdev/include/usb/dev/device.h	(revision d39c46e03cdf4c2a6b309cc0244b5bf42b3b6000)
+++ uspace/lib/usbdev/include/usb/dev/device.h	(revision 33b8d024bc268f2773c26e74a40dada11bb71e58)
@@ -51,5 +51,5 @@
 	usb_standard_device_descriptor_t device;
 	/** Full configuration descriptor of current configuration. */
-	const void *full_config;
+	void *full_config;
 	size_t full_config_size;
 } usb_device_descriptors_t;
Index: uspace/lib/usbdev/include/usb/dev/request.h
===================================================================
--- uspace/lib/usbdev/include/usb/dev/request.h	(revision d39c46e03cdf4c2a6b309cc0244b5bf42b3b6000)
+++ uspace/lib/usbdev/include/usb/dev/request.h	(revision 33b8d024bc268f2773c26e74a40dada11bb71e58)
@@ -70,5 +70,5 @@
     void *, size_t, size_t *);
 errno_t usb_request_get_full_configuration_descriptor_alloc(usb_pipe_t *,
-    int, const void **, size_t *);
+    int, void **, size_t *);
 errno_t usb_request_set_descriptor(usb_pipe_t *, usb_request_type_t,
     usb_request_recipient_t, uint8_t, uint8_t, uint16_t, const void *, size_t);
Index: uspace/lib/usbdev/src/devpoll.c
===================================================================
--- uspace/lib/usbdev/src/devpoll.c	(revision d39c46e03cdf4c2a6b309cc0244b5bf42b3b6000)
+++ uspace/lib/usbdev/src/devpoll.c	(revision 33b8d024bc268f2773c26e74a40dada11bb71e58)
@@ -80,5 +80,5 @@
 {
 	assert(arg);
-	const polling_data_t *data = arg;
+	polling_data_t *data = arg;
 	/* Helper to reduce typing. */
 	const usb_device_auto_polling_t *params = &data->auto_polling;
Index: uspace/lib/usbdev/src/recognise.c
===================================================================
--- uspace/lib/usbdev/src/recognise.c	(revision d39c46e03cdf4c2a6b309cc0244b5bf42b3b6000)
+++ uspace/lib/usbdev/src/recognise.c	(revision 33b8d024bc268f2773c26e74a40dada11bb71e58)
@@ -61,5 +61,5 @@
  */
 static errno_t usb_add_match_id(match_id_list_t *matches, int score,
-    const char *match_str)
+    char *match_str)
 {
 	assert(matches);
Index: uspace/lib/usbdev/src/request.c
===================================================================
--- uspace/lib/usbdev/src/request.c	(revision d39c46e03cdf4c2a6b309cc0244b5bf42b3b6000)
+++ uspace/lib/usbdev/src/request.c	(revision 33b8d024bc268f2773c26e74a40dada11bb71e58)
@@ -475,5 +475,5 @@
 errno_t usb_request_get_full_configuration_descriptor_alloc(
     usb_pipe_t *pipe, int index,
-    const void **descriptor_ptr, size_t *descriptor_size)
+    void **descriptor_ptr, size_t *descriptor_size)
 {
 	errno_t rc;
Index: uspace/lib/usbhost/include/usb/host/usb_transfer_batch.h
===================================================================
--- uspace/lib/usbhost/include/usb/host/usb_transfer_batch.h	(revision d39c46e03cdf4c2a6b309cc0244b5bf42b3b6000)
+++ uspace/lib/usbhost/include/usb/host/usb_transfer_batch.h	(revision 33b8d024bc268f2773c26e74a40dada11bb71e58)
@@ -105,5 +105,5 @@
     void *arg
 );
-void usb_transfer_batch_destroy(const usb_transfer_batch_t *instance);
+void usb_transfer_batch_destroy(usb_transfer_batch_t *instance);
 
 void usb_transfer_batch_finish_error(const usb_transfer_batch_t *instance,
Index: uspace/lib/usbhost/src/usb_transfer_batch.c
===================================================================
--- uspace/lib/usbhost/src/usb_transfer_batch.c	(revision d39c46e03cdf4c2a6b309cc0244b5bf42b3b6000)
+++ uspace/lib/usbhost/src/usb_transfer_batch.c	(revision 33b8d024bc268f2773c26e74a40dada11bb71e58)
@@ -94,5 +94,5 @@
  * @param[in] instance Batch structure to use.
  */
-void usb_transfer_batch_destroy(const usb_transfer_batch_t *instance)
+void usb_transfer_batch_destroy(usb_transfer_batch_t *instance)
 {
 	if (!instance)
Index: uspace/lib/usbvirt/include/usbvirt/device.h
===================================================================
--- uspace/lib/usbvirt/include/usbvirt/device.h	(revision d39c46e03cdf4c2a6b309cc0244b5bf42b3b6000)
+++ uspace/lib/usbvirt/include/usbvirt/device.h	(revision 33b8d024bc268f2773c26e74a40dada11bb71e58)
@@ -154,5 +154,5 @@
 	usb_standard_configuration_descriptor_t *descriptor;
 	/** Array of extra data. */
-	const usbvirt_device_configuration_extras_t *extra;
+	usbvirt_device_configuration_extras_t *extra;
 	/** Length of @c extra array. */
 	size_t extra_count;
Index: uspace/srv/audio/hound/audio_data.c
===================================================================
--- uspace/srv/audio/hound/audio_data.c	(revision d39c46e03cdf4c2a6b309cc0244b5bf42b3b6000)
+++ uspace/srv/audio/hound/audio_data.c	(revision 33b8d024bc268f2773c26e74a40dada11bb71e58)
@@ -36,4 +36,5 @@
 #include <macros.h>
 #include <stdlib.h>
+#include <str.h>
 
 #include "audio_data.h"
@@ -50,5 +51,5 @@
     pcm_format_t format)
 {
-	audio_data_t *adata = malloc(sizeof(audio_data_t));
+	audio_data_t *adata = malloc(sizeof(audio_data_t) + size);
 	if (adata) {
 		unsigned overflow = size % pcm_format_frame_size(&format);
@@ -56,6 +57,6 @@
 			log_warning("Data not a multiple of frame size, "
 			    "clipping.");
-
-		adata->data = data;
+		uint8_t *d = ((uint8_t *)adata) + offsetof(audio_data_t, data);
+		memcpy(d, data, size);
 		adata->size = size - overflow;
 		adata->format = format;
@@ -86,5 +87,4 @@
 	atomic_count_t refc = atomic_predec(&adata->refcount);
 	if (refc == 0) {
-		free(adata->data);
 		free(adata);
 	}
Index: uspace/srv/audio/hound/audio_data.h
===================================================================
--- uspace/srv/audio/hound/audio_data.h	(revision d39c46e03cdf4c2a6b309cc0244b5bf42b3b6000)
+++ uspace/srv/audio/hound/audio_data.h	(revision 33b8d024bc268f2773c26e74a40dada11bb71e58)
@@ -45,6 +45,4 @@
 /** Reference counted audio buffer */
 typedef struct {
-	/** Audio data */
-	const void *data;
 	/** Size of the buffer pointer to by data */
 	size_t size;
@@ -53,4 +51,6 @@
 	/** Reference counter */
 	atomic_t refcount;
+	/** Audio data */
+	const uint8_t data[];
 } audio_data_t;
 
Index: uspace/srv/audio/hound/audio_sink.h
===================================================================
--- uspace/srv/audio/hound/audio_sink.h	(revision d39c46e03cdf4c2a6b309cc0244b5bf42b3b6000)
+++ uspace/srv/audio/hound/audio_sink.h	(revision 33b8d024bc268f2773c26e74a40dada11bb71e58)
@@ -54,5 +54,5 @@
 	list_t connections;
 	/** Sink's name */
-	const char *name;
+	char *name;
 	/** Consumes data in this format */
 	pcm_format_t format;
Index: uspace/srv/audio/hound/audio_source.c
===================================================================
--- uspace/srv/audio/hound/audio_source.c	(revision d39c46e03cdf4c2a6b309cc0244b5bf42b3b6000)
+++ uspace/srv/audio/hound/audio_source.c	(revision 33b8d024bc268f2773c26e74a40dada11bb71e58)
@@ -96,5 +96,5 @@
  * @return Error code.
  */
-errno_t audio_source_push_data(audio_source_t *source, const void *data,
+errno_t audio_source_push_data(audio_source_t *source, void *data,
     size_t size)
 {
Index: uspace/srv/audio/hound/audio_source.h
===================================================================
--- uspace/srv/audio/hound/audio_source.h	(revision d39c46e03cdf4c2a6b309cc0244b5bf42b3b6000)
+++ uspace/srv/audio/hound/audio_source.h	(revision 33b8d024bc268f2773c26e74a40dada11bb71e58)
@@ -49,5 +49,5 @@
 	list_t connections;
 	/** String identifier */
-	const char *name;
+	char *name;
 	/** audio data format */
 	pcm_format_t format;
@@ -75,5 +75,5 @@
     const pcm_format_t *f);
 void audio_source_fini(audio_source_t *source);
-errno_t audio_source_push_data(audio_source_t *source, const void *data,
+errno_t audio_source_push_data(audio_source_t *source, void *data,
     size_t size);
 static inline const pcm_format_t *audio_source_format(const audio_source_t *s)
Index: uspace/srv/audio/hound/hound.c
===================================================================
--- uspace/srv/audio/hound/hound.c	(revision d39c46e03cdf4c2a6b309cc0244b5bf42b3b6000)
+++ uspace/srv/audio/hound/hound.c	(revision 33b8d024bc268f2773c26e74a40dada11bb71e58)
@@ -414,5 +414,5 @@
  * @return Error code.
  */
-errno_t hound_list_sources(hound_t *hound, const char ***list, size_t *size)
+errno_t hound_list_sources(hound_t *hound, char ***list, size_t *size)
 {
 	assert(hound);
@@ -428,5 +428,5 @@
 		return EOK;
 	}
-	const char **names = calloc(count, sizeof(char *));
+	char **names = calloc(count, sizeof(char *));
 	errno_t ret = names ? EOK : ENOMEM;
 	for (unsigned long i = 0; i < count && ret == EOK; ++i) {
@@ -456,5 +456,5 @@
  * @return Error code.
  */
-errno_t hound_list_sinks(hound_t *hound, const char ***list, size_t *size)
+errno_t hound_list_sinks(hound_t *hound, char ***list, size_t *size)
 {
 	assert(hound);
@@ -470,5 +470,5 @@
 		return EOK;
 	}
-	const char **names = calloc(count, sizeof(char *));
+	char **names = calloc(count, sizeof(char *));
 	errno_t ret = names ? EOK : ENOMEM;
 	for (size_t i = 0; i < count && ret == EOK; ++i) {
Index: uspace/srv/audio/hound/hound.h
===================================================================
--- uspace/srv/audio/hound/hound.h	(revision d39c46e03cdf4c2a6b309cc0244b5bf42b3b6000)
+++ uspace/srv/audio/hound/hound.h	(revision 33b8d024bc268f2773c26e74a40dada11bb71e58)
@@ -73,6 +73,6 @@
 errno_t hound_add_source(hound_t *hound, audio_source_t *source);
 errno_t hound_add_sink(hound_t *hound, audio_sink_t *sink);
-errno_t hound_list_sources(hound_t *hound, const char ***list, size_t *size);
-errno_t hound_list_sinks(hound_t *hound, const char ***list, size_t *size);
+errno_t hound_list_sources(hound_t *hound, char ***list, size_t *size);
+errno_t hound_list_sinks(hound_t *hound, char ***list, size_t *size);
 errno_t hound_list_connections(hound_t *hound, const char ***sources,
     const char ***sinks, size_t *size);
Index: uspace/srv/audio/hound/iface.c
===================================================================
--- uspace/srv/audio/hound/iface.c	(revision d39c46e03cdf4c2a6b309cc0244b5bf42b3b6000)
+++ uspace/srv/audio/hound/iface.c	(revision 33b8d024bc268f2773c26e74a40dada11bb71e58)
@@ -86,5 +86,5 @@
 }
 
-static errno_t iface_get_list(void *server, const char ***list, size_t *size,
+static errno_t iface_get_list(void *server, char ***list, size_t *size,
     const char *connection, int flags)
 {
Index: uspace/srv/devman/devman.h
===================================================================
--- uspace/srv/devman/devman.h	(revision d39c46e03cdf4c2a6b309cc0244b5bf42b3b6000)
+++ uspace/srv/devman/devman.h	(revision 33b8d024bc268f2773c26e74a40dada11bb71e58)
@@ -80,5 +80,5 @@
 	char *name;
 	/** Path to the driver's binary. */
-	const char *binary_path;
+	char *binary_path;
 	/** List of device ids for device-to-driver matching. */
 	match_id_list_t match_ids;
