Blame SOURCES/0029-sss_sockets-pass-pointer-instead-of-integer.patch

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