projects
/
systemd
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
64177e9
)
test-sizeof: print size socklen_t
author
Zbigniew Jędrzejewski-Szmek
<zbyszek@in.waw.pl>
Mon, 2 Mar 2020 14:52:28 +0000
(15:52 +0100)
committer
Zbigniew Jędrzejewski-Szmek
<zbyszek@in.waw.pl>
Mon, 2 Mar 2020 14:54:57 +0000
(15:54 +0100)
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.
src/test/test-sizeof.c
patch
|
blob
|
history
diff --git
a/src/test/test-sizeof.c
b/src/test/test-sizeof.c
index 7fc16a62b656c5d497cecdd6c47fc88192dc7972..1020e0cb3153594bcd7f8781e129b82404afc8f2 100644
(file)
--- a/
src/test/test-sizeof.c
+++ b/
src/test/test-sizeof.c
@@
-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);