diff --git a/lib/aarch64/xlat_tables.c b/lib/aarch64/xlat_tables.c
index 33a8b6d..6e04f65 100644
--- a/lib/aarch64/xlat_tables.c
+++ b/lib/aarch64/xlat_tables.c
@@ -61,14 +61,14 @@
  * Array of all memory regions stored in order of ascending base address.
  * The list is terminated by the first entry with size == 0.
  */
-static mmap_region mmap[MAX_MMAP_REGIONS + 1];
+static mmap_region_t mmap[MAX_MMAP_REGIONS + 1];
 
 
 static void print_mmap(void)
 {
 #if DEBUG_XLAT_TABLE
 	debug_print("mmap:\n");
-	mmap_region *mm = mmap;
+	mmap_region_t *mm = mmap;
 	while (mm->size) {
 		debug_print(" %010lx %10lx %x\n", mm->base, mm->size, mm->attr);
 		++mm;
@@ -79,8 +79,8 @@
 
 void mmap_add_region(unsigned long base, unsigned long size, unsigned attr)
 {
-	mmap_region *mm = mmap;
-	mmap_region *mm_last = mm + sizeof(mmap) / sizeof(mmap[0]) - 1;
+	mmap_region_t *mm = mmap;
+	mmap_region_t *mm_last = mm + sizeof(mmap) / sizeof(mmap[0]) - 1;
 
 	assert(IS_PAGE_ALIGNED(base));
 	assert(IS_PAGE_ALIGNED(size));
@@ -103,7 +103,7 @@
 	mm->attr = attr;
 }
 
-void mmap_add(const mmap_region *mm)
+void mmap_add(const mmap_region_t *mm)
 {
 	while (mm->size) {
 		mmap_add_region(mm->base, mm->size, mm->attr);
@@ -140,7 +140,7 @@
 	return desc;
 }
 
-static int mmap_region_attr(mmap_region *mm, unsigned long base,
+static int mmap_region_attr(mmap_region_t *mm, unsigned long base,
 					unsigned long size)
 {
 	int attr = mm->attr;
@@ -167,7 +167,7 @@
 	}
 }
 
-static mmap_region *init_xlation_table(mmap_region *mm, unsigned long base,
+static mmap_region_t *init_xlation_table(mmap_region_t *mm, unsigned long base,
 					unsigned long *table, unsigned level)
 {
 	unsigned level_size_shift = L1_XLAT_ADDRESS_SHIFT - (level - 1) *
diff --git a/lib/io_storage.c b/lib/io_storage.c
index cd9c2bd..c3b94bb 100644
--- a/lib/io_storage.c
+++ b/lib/io_storage.c
@@ -40,24 +40,24 @@
 
 
 /* Storage for a fixed maximum number of IO entities, definable by platform */
-static struct io_entity entity_pool[MAX_IO_HANDLES];
+static io_entity_t entity_pool[MAX_IO_HANDLES];
 
 /* Simple way of tracking used storage - each entry is NULL or a pointer to an
  * entity */
-static struct io_entity *entity_map[MAX_IO_HANDLES];
+static io_entity_t *entity_map[MAX_IO_HANDLES];
 
 /* Track number of allocated entities */
 static unsigned int entity_count;
 
 
 /* Used to keep a reference to platform-specific data */
-static struct io_plat_data *platform_data;
+static io_plat_data_t *platform_data;
 
 
 #if DEBUG	/* Extra validation functions only used in debug builds */
 
 /* Return a boolean value indicating whether a device connector is valid */
-static int is_valid_dev_connector(const struct io_dev_connector *dev_con)
+static int is_valid_dev_connector(const io_dev_connector_t *dev_con)
 {
 	int result = (dev_con != NULL) && (dev_con->dev_open != NULL);
 	return result;
@@ -67,7 +67,7 @@
 /* Return a boolean value indicating whether a device handle is valid */
 static int is_valid_dev(io_dev_handle handle)
 {
-	const struct io_dev_info *dev = handle;
+	const io_dev_info_t *dev = handle;
 	int result = (dev != NULL) && (dev->funcs != NULL) &&
 			(dev->funcs->type != NULL) &&
 			(dev->funcs->type() < IO_TYPE_MAX);
@@ -78,14 +78,14 @@
 /* Return a boolean value indicating whether an IO entity is valid */
 static int is_valid_entity(io_handle handle)
 {
-	const struct io_entity *entity = handle;
+	const io_entity_t *entity = handle;
 	int result = (entity != NULL) && (is_valid_dev(entity->dev_handle));
 	return result;
 }
 
 
 /* Return a boolean value indicating whether a seek mode is valid */
-static int is_valid_seek_mode(io_seek_mode mode)
+static int is_valid_seek_mode(io_seek_mode_t mode)
 {
 	return ((mode != IO_SEEK_INVALID) && (mode < IO_SEEK_MAX));
 }
@@ -94,8 +94,8 @@
 
 
 /* Open a connection to a specific device */
-static int dev_open(const struct io_dev_connector *dev_con, void *dev_spec,
-		struct io_dev_info **dev_info)
+static int dev_open(const io_dev_connector_t *dev_con, void *dev_spec,
+		io_dev_info_t **dev_info)
 {
 	int result = IO_FAIL;
 	assert(dev_info != NULL);
@@ -107,7 +107,7 @@
 
 
 /* Set a handle to track an entity */
-static void set_handle(io_handle *handle, struct io_entity *entity)
+static void set_handle(io_handle *handle, io_entity_t *entity)
 {
 	assert(handle != NULL);
 	*handle = entity;
@@ -217,7 +217,7 @@
 	assert(dev_handle != NULL);
 	assert(is_valid_dev(dev_handle));
 
-	struct io_dev_info *dev = dev_handle;
+	io_dev_info_t *dev = dev_handle;
 
 	if (dev->funcs->dev_init != NULL) {
 		result = dev->funcs->dev_init(dev, init_params);
@@ -238,7 +238,7 @@
 	assert(dev_handle != NULL);
 	assert(is_valid_dev(dev_handle));
 
-	struct io_dev_info *dev = dev_handle;
+	io_dev_info_t *dev = dev_handle;
 
 	if (dev->funcs->dev_close != NULL) {
 		result = dev->funcs->dev_close(dev);
@@ -261,8 +261,8 @@
 	assert((spec != NULL) && (handle != NULL));
 	assert(is_valid_dev(dev_handle));
 
-	struct io_dev_info *dev = dev_handle;
-	struct io_entity *entity;
+	io_dev_info_t *dev = dev_handle;
+	io_entity_t *entity;
 
 	result = allocate_entity(&entity);
 
@@ -281,14 +281,14 @@
 
 
 /* Seek to a specific position in an IO entity */
-int io_seek(io_handle handle, io_seek_mode mode, ssize_t offset)
+int io_seek(io_handle handle, io_seek_mode_t mode, ssize_t offset)
 {
 	int result = IO_FAIL;
 	assert(is_valid_entity(handle) && is_valid_seek_mode(mode));
 
-	struct io_entity *entity = handle;
+	io_entity_t *entity = handle;
 
-	struct io_dev_info *dev = entity->dev_handle;
+	io_dev_info_t *dev = entity->dev_handle;
 
 	if (dev->funcs->seek != NULL)
 		result = dev->funcs->seek(entity, mode, offset);
@@ -305,9 +305,9 @@
 	int result = IO_FAIL;
 	assert(is_valid_entity(handle) && (length != NULL));
 
-	struct io_entity *entity = handle;
+	io_entity_t *entity = handle;
 
-	struct io_dev_info *dev = entity->dev_handle;
+	io_dev_info_t *dev = entity->dev_handle;
 
 	if (dev->funcs->size != NULL)
 		result = dev->funcs->size(entity, length);
@@ -324,9 +324,9 @@
 	int result = IO_FAIL;
 	assert(is_valid_entity(handle) && (buffer != NULL));
 
-	struct io_entity *entity = handle;
+	io_entity_t *entity = handle;
 
-	struct io_dev_info *dev = entity->dev_handle;
+	io_dev_info_t *dev = entity->dev_handle;
 
 	if (dev->funcs->read != NULL)
 		result = dev->funcs->read(entity, buffer, length, length_read);
@@ -344,9 +344,9 @@
 	int result = IO_FAIL;
 	assert(is_valid_entity(handle) && (buffer != NULL));
 
-	struct io_entity *entity = handle;
+	io_entity_t *entity = handle;
 
-	struct io_dev_info *dev = entity->dev_handle;
+	io_dev_info_t *dev = entity->dev_handle;
 
 	if (dev->funcs->write != NULL) {
 		result = dev->funcs->write(entity, buffer, length,
@@ -364,9 +364,9 @@
 	int result = IO_FAIL;
 	assert(is_valid_entity(handle));
 
-	struct io_entity *entity = handle;
+	io_entity_t *entity = handle;
 
-	struct io_dev_info *dev = entity->dev_handle;
+	io_dev_info_t *dev = entity->dev_handle;
 
 	if (dev->funcs->close != NULL)
 		result = dev->funcs->close(entity);
diff --git a/lib/locks/bakery/bakery_lock.c b/lib/locks/bakery/bakery_lock.c
index 03f1e74..3cb9248 100644
--- a/lib/locks/bakery/bakery_lock.c
+++ b/lib/locks/bakery/bakery_lock.c
@@ -66,7 +66,7 @@
 
 
 /* Initialize Bakery Lock to reset ownership and all ticket values */
-void bakery_lock_init(bakery_lock *bakery)
+void bakery_lock_init(bakery_lock_t *bakery)
 {
 	assert(bakery);
 
@@ -77,7 +77,7 @@
 
 
 /* Obtain a ticket for a given CPU */
-static unsigned int bakery_get_ticket(bakery_lock *bakery, unsigned int me)
+static unsigned int bakery_get_ticket(bakery_lock_t *bakery, unsigned int me)
 {
 	unsigned int my_ticket, their_ticket;
 	unsigned int they;
@@ -124,7 +124,7 @@
  * of others'. The CPU with the highest priority (lowest numerical value)
  * acquires the lock
  */
-void bakery_lock_get(unsigned long mpidr, bakery_lock *bakery)
+void bakery_lock_get(unsigned long mpidr, bakery_lock_t *bakery)
 {
 	unsigned int they, me;
 	unsigned int my_ticket, my_prio, their_ticket;
@@ -176,7 +176,7 @@
 
 
 /* Release the lock and signal contenders */
-void bakery_lock_release(unsigned long mpidr, bakery_lock *bakery)
+void bakery_lock_release(unsigned long mpidr, bakery_lock_t *bakery)
 {
 	unsigned int me = platform_get_core_pos(mpidr);
 
diff --git a/lib/semihosting/semihosting.c b/lib/semihosting/semihosting.c
index d5b8524..3232cd5 100644
--- a/lib/semihosting/semihosting.c
+++ b/lib/semihosting/semihosting.c
@@ -45,23 +45,23 @@
 	const char *file_name;
 	unsigned long mode;
 	size_t name_length;
-} smh_file_open_block;
+} smh_file_open_block_t;
 
 typedef struct {
 	long handle;
 	void *buffer;
 	size_t length;
-} smh_file_read_write_block;
+} smh_file_read_write_block_t;
 
 typedef struct {
 	long handle;
 	ssize_t location;
-} smh_file_seek_block;
+} smh_file_seek_block_t;
 
 typedef struct {
 	char *command_line;
 	size_t command_length;
-} smh_system_block;
+} smh_system_block_t;
 
 long semihosting_connection_supported(void)
 {
@@ -70,7 +70,7 @@
 
 long semihosting_file_open(const char *file_name, size_t mode)
 {
-	smh_file_open_block open_block;
+	smh_file_open_block_t open_block;
 
 	open_block.file_name = file_name;
 	open_block.mode = mode;
@@ -82,7 +82,7 @@
 
 long semihosting_file_seek(long file_handle, ssize_t offset)
 {
-	smh_file_seek_block seek_block;
+	smh_file_seek_block_t seek_block;
 	long result;
 
 	seek_block.handle = file_handle;
@@ -99,7 +99,7 @@
 
 long semihosting_file_read(long file_handle, size_t *length, void *buffer)
 {
-	smh_file_read_write_block read_block;
+	smh_file_read_write_block_t read_block;
 	long result = -EINVAL;
 
 	if ((length == NULL) || (buffer == NULL))
@@ -125,7 +125,7 @@
 			    size_t *length,
 			    const void *buffer)
 {
-	smh_file_read_write_block write_block;
+	smh_file_read_write_block_t write_block;
 
 	if ((length == NULL) || (buffer == NULL))
 		return -EINVAL;
@@ -169,7 +169,7 @@
 
 long semihosting_system(char *command_line)
 {
-	smh_system_block system_block;
+	smh_system_block_t system_block;
 
 	system_block.command_line = command_line;
 	system_block.command_length = strlen(command_line);
