Missing includes:
<stdint.h>
<stdio.h>
<stdlib.h>
<string.h>
<strings.h>

"deviceapi.h"
"logging.h"
"util.h"