Commit 6c3c9702 authored by Jan Kiszka's avatar Jan Kiszka

drivers/ipc: Account for renaming of SO_RCVTIMEO/SO_SNDTIMEO

Use the *_OLD defines for the 2038-wise unconverted socket options.
Signed-off-by: Jan Kiszka's avatarJan Kiszka <jan.kiszka@siemens.com>
parent 608c2329
......@@ -158,6 +158,8 @@ devm_hwmon_device_register_with_groups(struct device *dev, const char *name,
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,1,0)
#define old_timex32 compat_timex
#define SO_RCVTIMEO_OLD SO_RCVTIMEO
#define SO_SNDTIMEO_OLD SO_SNDTIMEO
#endif
#endif /* _COBALT_ASM_GENERIC_WRAPPERS_H */
......@@ -830,14 +830,14 @@ static int __bufp_setsockopt(struct bufp_socket *sk,
if (sopt.level == SOL_SOCKET) {
switch (sopt.optname) {
case SO_RCVTIMEO:
case SO_RCVTIMEO_OLD:
ret = rtipc_get_timeval(fd, &tv, sopt.optval, sopt.optlen);
if (ret)
return ret;
sk->rx_timeout = rtipc_timeval_to_ns(&tv);
break;
case SO_SNDTIMEO:
case SO_SNDTIMEO_OLD:
ret = rtipc_get_timeval(fd, &tv, sopt.optval, sopt.optlen);
if (ret)
return ret;
......@@ -922,14 +922,14 @@ static int __bufp_getsockopt(struct bufp_socket *sk,
if (sopt.level == SOL_SOCKET) {
switch (sopt.optname) {
case SO_RCVTIMEO:
case SO_RCVTIMEO_OLD:
rtipc_ns_to_timeval(&tv, sk->rx_timeout);
ret = rtipc_put_timeval(fd, sopt.optval, &tv, len);
if (ret)
return ret;
break;
case SO_SNDTIMEO:
case SO_SNDTIMEO_OLD:
rtipc_ns_to_timeval(&tv, sk->tx_timeout);
ret = rtipc_put_timeval(fd, sopt.optval, &tv, len);
if (ret)
......
......@@ -712,14 +712,14 @@ static int __iddp_setsockopt(struct iddp_socket *sk,
if (sopt.level == SOL_SOCKET) {
switch (sopt.optname) {
case SO_RCVTIMEO:
case SO_RCVTIMEO_OLD:
ret = rtipc_get_timeval(fd, &tv, sopt.optval, sopt.optlen);
if (ret)
return ret;
sk->rx_timeout = rtipc_timeval_to_ns(&tv);
break;
case SO_SNDTIMEO:
case SO_SNDTIMEO_OLD:
ret = rtipc_get_timeval(fd, &tv, sopt.optval, sopt.optlen);
if (ret)
return ret;
......@@ -805,14 +805,14 @@ static int __iddp_getsockopt(struct iddp_socket *sk,
if (sopt.level == SOL_SOCKET) {
switch (sopt.optname) {
case SO_RCVTIMEO:
case SO_RCVTIMEO_OLD:
rtipc_ns_to_timeval(&tv, sk->rx_timeout);
ret = rtipc_put_timeval(fd, sopt.optval, &tv, len);
if (ret)
return ret;
break;
case SO_SNDTIMEO:
case SO_SNDTIMEO_OLD:
rtipc_ns_to_timeval(&tv, sk->tx_timeout);
ret = rtipc_put_timeval(fd, sopt.optval, &tv, len);
if (ret)
......
......@@ -867,7 +867,7 @@ static int __xddp_setsockopt(struct xddp_socket *sk,
if (sopt.level == SOL_SOCKET) {
switch (sopt.optname) {
case SO_RCVTIMEO:
case SO_RCVTIMEO_OLD:
ret = rtipc_get_timeval(fd, &tv, sopt.optval, sopt.optlen);
if (ret)
return ret;
......@@ -976,7 +976,7 @@ static int __xddp_getsockopt(struct xddp_socket *sk,
if (sopt.level == SOL_SOCKET) {
switch (sopt.optname) {
case SO_RCVTIMEO:
case SO_RCVTIMEO_OLD:
rtipc_ns_to_timeval(&tv, sk->timeout);
ret = rtipc_put_timeval(fd, sopt.optval, &tv, len);
if (ret)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment