diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2021-07-05 12:48:48 +0000 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2021-07-06 11:45:35 -0300 |
commit | cf2256196cc843b574e39eb05b77fc0c00024aa1 (patch) | |
tree | 0aec8822f9baa95fab4592768acf069233b0ec30 /sysdeps/unix | |
parent | f7de21498dc6c517969315dcb3a675072c2cc87f (diff) | |
download | glibc-cf2256196cc843b574e39eb05b77fc0c00024aa1.tar glibc-cf2256196cc843b574e39eb05b77fc0c00024aa1.tar.gz glibc-cf2256196cc843b574e39eb05b77fc0c00024aa1.tar.bz2 glibc-cf2256196cc843b574e39eb05b77fc0c00024aa1.zip |
linux: Fix setsockopt fallback
The final 2 arguments for SO_TIMESTAMP/SO_TIMESTAMPNS are being set
wrongly.
Checked on x86_64-linux-gnu and i686-linux-gnu.
Diffstat (limited to 'sysdeps/unix')
-rw-r--r-- | sysdeps/unix/sysv/linux/setsockopt.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sysdeps/unix/sysv/linux/setsockopt.c b/sysdeps/unix/sysv/linux/setsockopt.c index a4780a9d33..2792f1b5a1 100644 --- a/sysdeps/unix/sysv/linux/setsockopt.c +++ b/sysdeps/unix/sysv/linux/setsockopt.c @@ -78,7 +78,9 @@ setsockopt32 (int fd, int level, int optname, const void *optval, optname = COMPAT_SO_TIMESTAMP_OLD; if (optname == COMPAT_SO_TIMESTAMPNS_NEW) optname = COMPAT_SO_TIMESTAMPNS_OLD; - r = setsockopt_syscall (fd, level, optname, NULL, 0); + /* The expected type for the option is an 'int' for both types of + timestamp formats, so there is no need to convert it. */ + r = setsockopt_syscall (fd, level, optname, optval, len); } break; } |