Index: uspace/srv/fs/fat/fat_dentry.c
===================================================================
--- uspace/srv/fs/fat/fat_dentry.c	(revision 10092c9abb5821b70ff5d52e4169b412bd47cff0)
+++ uspace/srv/fs/fat/fat_dentry.c	(revision c8830a20a6bbbb537f190f7f79dc56eaad4f8b8c)
@@ -44,4 +44,5 @@
 #include <assert.h>
 #include <unistd.h>
+#include <sys/types.h>
 
 /** Compare path component with the name read from the dentry.
@@ -232,5 +233,6 @@
 /** Get number of bytes in a string with size limit.
  *
- * @param str  NULL-terminated (or not) string.
+ * @param str  NULL-terminated (or not) string. The pointer comes from a packed
+ *             structure and as such is expected to be unaligned. 
  * @param size Maximum number of bytes to consider.
  *
@@ -238,5 +240,5 @@
  *
  */
-size_t fat_lfn_str_nlength(const uint16_t *str, size_t size)
+size_t fat_lfn_str_nlength(const unaligned_uint16_t *str, size_t size)
 {
 	size_t offset = 0;
Index: uspace/srv/fs/fat/fat_dentry.h
===================================================================
--- uspace/srv/fs/fat/fat_dentry.h	(revision 10092c9abb5821b70ff5d52e4169b412bd47cff0)
+++ uspace/srv/fs/fat/fat_dentry.h	(revision c8830a20a6bbbb537f190f7f79dc56eaad4f8b8c)
@@ -37,4 +37,5 @@
 #include <stdint.h>
 #include <stdbool.h>
+#include <sys/types.h>
 
 #define IS_D_CHAR(ch) (isalnum(ch) || ch == '_')
@@ -132,5 +133,4 @@
 } __attribute__ ((packed)) fat_dentry_t;
 
-
 extern int fat_dentry_namecmp(char *, const char *);
 extern void fat_dentry_name_get(const fat_dentry_t *, char *);
@@ -139,5 +139,5 @@
 extern uint8_t fat_dentry_chksum(uint8_t *);
 
-extern size_t fat_lfn_str_nlength(const uint16_t *, size_t);
+extern size_t fat_lfn_str_nlength(const unaligned_uint16_t *, size_t);
 extern size_t fat_lfn_size(const fat_dentry_t *);
 extern size_t fat_lfn_get_entry(const fat_dentry_t *, uint16_t *, size_t *);
