diff options
Diffstat (limited to 'sysutils/rsyslog8/files/patch-runtime_nsd__ptcp.c')
-rw-r--r-- | sysutils/rsyslog8/files/patch-runtime_nsd__ptcp.c | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/sysutils/rsyslog8/files/patch-runtime_nsd__ptcp.c b/sysutils/rsyslog8/files/patch-runtime_nsd__ptcp.c new file mode 100644 index 000000000000..36ca7b7317c6 --- /dev/null +++ b/sysutils/rsyslog8/files/patch-runtime_nsd__ptcp.c @@ -0,0 +1,38 @@ +--- runtime/nsd_ptcp.c.orig 2015-01-13 22:06:22 UTC ++++ runtime/nsd_ptcp.c +@@ -656,7 +656,11 @@ EnableKeepAlive(nsd_t *pNsd) + if(pThis->iKeepAliveProbes > 0) { + optval = pThis->iKeepAliveProbes; + optlen = sizeof(optval); ++#if defined(SOL_TCP) + ret = setsockopt(pThis->sock, SOL_TCP, TCP_KEEPCNT, &optval, optlen); ++#else ++ ret = setsockopt(pThis->sock, SOL_SOCKET, TCP_KEEPCNT, &optval, optlen); ++#endif + } else { + ret = 0; + } +@@ -671,7 +675,11 @@ EnableKeepAlive(nsd_t *pNsd) + if(pThis->iKeepAliveTime > 0) { + optval = pThis->iKeepAliveTime; + optlen = sizeof(optval); ++#if defined(SOL_TCP) + ret = setsockopt(pThis->sock, SOL_TCP, TCP_KEEPIDLE, &optval, optlen); ++#else ++ ret = setsockopt(pThis->sock, SOL_SOCKET, TCP_KEEPIDLE, &optval, optlen); ++#endif + } else { + ret = 0; + } +@@ -686,7 +694,11 @@ EnableKeepAlive(nsd_t *pNsd) + if(pThis->iKeepAliveIntvl > 0) { + optval = pThis->iKeepAliveIntvl; + optlen = sizeof(optval); ++#if defined(SOL_TCP) + ret = setsockopt(pThis->sock, SOL_TCP, TCP_KEEPINTVL, &optval, optlen); ++#else ++ ret = setsockopt(pThis->sock, SOL_SOCKET, TCP_KEEPINTVL, &optval, optlen); ++#endif + } else { + ret = 0; + } |