The documentation for glibc stays they are integer types (no narrower than unsigned int), but I'm not finding a standards reference that says they have to be an integer type (see also time_t).
So in the end, the question becomes: Is
#include <stdio.h>
#include <stdint.h>
struct stat st;
if (stat("somefile", &st) == 0) {
printf("%ju %ju\n", (uintmax_t)st.st_dev, (uintmax_t)st.st_ino);
}
portable.