Use correct type, to fix warning

Signed-off-by: Erwin Rol <erwin@erwinrol.com>
Add err() macro if it is not defined already

Signed-off-by: Erwin Rol <erwin@erwinrol.com>