/* Tell me what the size and structure of struct timeval are on ARM, so I can call select(2) from assembly. On amd64 it says: 16 bytes for struct timeval; tv_sec is at 0 and is of size 8, while tv_usec is at 8 and is of size 8 On arm-linux-gnueabi (arm32) it says: 8 bytes for struct timeval; tv_sec is at 0 and is of size 4, while tv_usec is at 4 and is of size 4 */ #include #include #include int main() { struct timeval tv; printf("%zu bytes for struct timeval; tv_sec is at %zu and is of size %zu, while tv_usec is at %zu and is of size %zu\n", sizeof(tv), (size_t)offsetof(struct timeval, tv_sec), sizeof(tv.tv_sec), (size_t)offsetof(struct timeval, tv_usec), sizeof(tv.tv_usec)); return 0; }