|
|
ef0222 |
From 191f3722f28107ccde4ce96dd88a401fb36b059a Mon Sep 17 00:00:00 2001
|
|
|
ef0222 |
From: =?UTF-8?q?Pavel=20B=C5=99ezina?= <pbrezina@redhat.com>
|
|
|
ef0222 |
Date: Mon, 10 Feb 2020 11:52:35 +0100
|
|
|
ef0222 |
Subject: [PATCH] sss_sockets: pass pointer instead of integer
|
|
|
ef0222 |
MIME-Version: 1.0
|
|
|
ef0222 |
Content-Type: text/plain; charset=UTF-8
|
|
|
ef0222 |
Content-Transfer-Encoding: 8bit
|
|
|
ef0222 |
|
|
|
ef0222 |
```
|
|
|
ef0222 |
/home/pbrezina/workspace/sssd/src/util/sss_sockets.c: In function ‘set_fd_common_opts’:
|
|
|
ef0222 |
/home/pbrezina/workspace/sssd/src/util/sss_sockets.c:123:61: error: passing argument 4 of ‘setsockopt’ makes pointer from integer without a cast [-Werror=int-conversion]
|
|
|
ef0222 |
123 | ret = setsockopt(fd, IPPROTO_TCP, TCP_USER_TIMEOUT, milli,
|
|
|
ef0222 |
| ^~~~~
|
|
|
ef0222 |
| |
|
|
|
ef0222 |
| unsigned int
|
|
|
ef0222 |
In file included from /home/pbrezina/workspace/sssd/src/util/sss_sockets.c:28:
|
|
|
ef0222 |
/usr/include/sys/socket.h:216:22: note: expected ‘const void *’ but argument is of type ‘unsigned int’
|
|
|
ef0222 |
216 | const void *__optval, socklen_t __optlen) __THROW;
|
|
|
ef0222 |
| ~~~~~~~~~~~~^~~~~~~~
|
|
|
ef0222 |
CC src/util/sssd_kcm-sss_iobuf.o
|
|
|
ef0222 |
cc1: all warnings being treated as errors
|
|
|
ef0222 |
```
|
|
|
ef0222 |
|
|
|
ef0222 |
Introduced by 7aa96458f3bec4ef6ff7385107458e6b2b0b06ac
|
|
|
ef0222 |
|
|
|
ef0222 |
Reviewed-by: Sumit Bose <sbose@redhat.com>
|
|
|
ef0222 |
(cherry picked from commit 5b87af6f5b50c464ee7ea4558f73431e398e1423)
|
|
|
ef0222 |
---
|
|
|
ef0222 |
src/util/sss_sockets.c | 2 +-
|
|
|
ef0222 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
ef0222 |
|
|
|
ef0222 |
diff --git a/src/util/sss_sockets.c b/src/util/sss_sockets.c
|
|
|
ef0222 |
index b6b6dbac5..6f2b71bc8 100644
|
|
|
ef0222 |
--- a/src/util/sss_sockets.c
|
|
|
ef0222 |
+++ b/src/util/sss_sockets.c
|
|
|
ef0222 |
@@ -120,7 +120,7 @@ static errno_t set_fd_common_opts(int fd, int timeout)
|
|
|
ef0222 |
}
|
|
|
ef0222 |
|
|
|
ef0222 |
milli = timeout * 1000; /* timeout in milliseconds */
|
|
|
ef0222 |
- ret = setsockopt(fd, IPPROTO_TCP, TCP_USER_TIMEOUT, milli,
|
|
|
ef0222 |
+ ret = setsockopt(fd, IPPROTO_TCP, TCP_USER_TIMEOUT, &milli,
|
|
|
ef0222 |
sizeof(milli));
|
|
|
ef0222 |
if (ret != 0) {
|
|
|
ef0222 |
ret = errno;
|
|
|
ef0222 |
--
|
|
|
ef0222 |
2.20.1
|
|
|
ef0222 |
|