Files
ports/games/gtkatlantic/files/patch-src_client.c
T
Tobias C. Berner 83e0ccc36f games/gtkatlantic: update to 0.6.3, to fix build with clang11
- if some one actually uses this software, please step up and maintain it.
2020-08-29 13:47:15 +00:00

24 lines
1.2 KiB
C

--- src/client.c.orig 2020-08-29 13:39:41 UTC
+++ src/client.c
@@ -213,17 +213,17 @@ static void* client_connect_async(connection *c) {
#if defined(TCP_KEEPIDLE) && defined(TCP_KEEPINTVL) && defined(TCP_KEEPCNT)
/* 10s idle before keepalive probe */
opt = 10;
- if (setsockopt(sock, SOL_TCP, TCP_KEEPIDLE, (char*)&opt, sizeof(opt))) {
+ if (setsockopt(sock, IPPROTO_TCP, TCP_KEEPIDLE, (char*)&opt, sizeof(opt))) {
fprintf(stderr, "setsockopt() TCP_KEEPIDLE failed on socket %d: %s\n", sock, strerror(errno));
}
/* 10s probe interval */
opt = 10;
- if (setsockopt(sock, SOL_TCP, TCP_KEEPINTVL, (char*)&opt, sizeof(opt))) {
+ if (setsockopt(sock, IPPROTO_TCP, TCP_KEEPINTVL, (char*)&opt, sizeof(opt))) {
fprintf(stderr, "setsockopt() TCP_KEEPINTVL failed on socket %d: %s\n", sock, strerror(errno));
}
/* consider session down after 10 missed probes */
opt = 10;
- if (setsockopt(sock, SOL_TCP, TCP_KEEPCNT, (char*)&opt, sizeof(opt))) {
+ if (setsockopt(sock, IPPROTO_TCP, TCP_KEEPCNT, (char*)&opt, sizeof(opt))) {
fprintf(stderr, "setsockopt() TCP_KEEPCNT failed on socket %d: %s\n", sock, strerror(errno));
}
#endif /* TCP_KEEPIDLE && TCP_KEEPINTVL && TCP_KEEPCNT */