test-sizeof: print size socklen_t
It returns 32 bits, unsigned on amd64, so it's probably similar everywhere with glibc. But let's make the code generic, without assuming specific size or signedness.
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
#include <sched.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
|
||||
#define __STDC_WANT_IEC_60559_TYPES_EXT__
|
||||
#include <float.h>
|
||||
@@ -65,6 +67,7 @@ int main(void) {
|
||||
info(pid_t);
|
||||
info(uid_t);
|
||||
info(gid_t);
|
||||
info(socklen_t);
|
||||
|
||||
info(__cpu_mask);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user