The solution is quite simple. In short, my structs were not not of the same size.
typedef struct dirent { char name[DIR_NAME]; int inum; bool active; char _unused[4]; } dirent;