There is an open issue in libarchive about this: https://github.com/libarchive/libarchive/issues/974
The fix would be to add the header in libarchive/archive_pack_dev.c
.
#include <sys/sysmacros.h>
I am not hitting the warning with gcc 8 in archlinux though.