Discussion:
[redis-db] Re: [PATCH] Add OpenBSD header guard around setsockopt()
Klemens Nanni
2018-09-02 11:34:52 UTC
Permalink
Another required patch on OpenBSD; can this be merged?
Resending as proper patch ontop of latest HEAD this time, feedback welcome.

From bdd6dacd867121c04d02b0287ed033f90050919c Mon Sep 17 00:00:00 2001
From: Klemens Nanni <***@openbsd.org>
Date: Sun, 2 Sep 2018 13:27:34 +0200
Subject: [PATCH 2/2] Add OpenBSD header guard around setsockopt(2)

---
deps/hiredis/net.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/deps/hiredis/net.c b/deps/hiredis/net.c
index 7d412098..206d3048 100644
--- a/deps/hiredis/net.c
+++ b/deps/hiredis/net.c
@@ -141,7 +141,7 @@ int redisKeepAlive(redisContext *c, int interval) {
return REDIS_ERR;
}
#else
-#if defined(__GLIBC__) && !defined(__FreeBSD_kernel__)
+#if defined(__GLIBC__) && !defined(__FreeBSD_kernel__) && !defined(__OpenBSD__)
val = interval;
if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPIDLE, &val, sizeof(val)) < 0) {
__redisSetError(c,REDIS_ERR_OTHER,strerror(errno));
--
2.18.0
--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+***@googlegroups.com.
To post to this group, send email to redis-***@googlegroups.com.
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
Klemens Nanni
2018-10-13 10:52:43 UTC
Permalink
Post by Klemens Nanni
Another required patch on OpenBSD; can this be merged?
Resending as proper patch ontop of latest HEAD this time, feedback welcome.
This patch is required for OpenBSD to work since July 2014 (redis-2.8.12)
as of our ports CVS log[0].

It's trivial and FreeBSD was fixed the same way with PR #3687[1]:

commit 6712bce92c79de5c2caa38e9b597a3fa52fd497f
Author: antirez <***@gmail.com>
Date: Wed Dec 21 12:11:56 2016 +0100

deps/hiredis updated to latest version.

Close #3687.

0: http://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/databases/redis/patches/patch-deps_hiredis_net_c?rev=1.1&content-type=text/x-cvsweb-markup
1: https://github.com/antirez/redis/issues/3687

To drop local modifications in our port, I'd be happy to see this diff
merged upstream.

Any form of feedback is really appreciated.

From f4defd946f2ca4e2c93b8d256223fa242a8b01a7 Mon Sep 17 00:00:00 2001
From: Klemens Nanni <***@openbsd.org>
Date: Sun, 2 Sep 2018 13:27:34 +0200
Subject: [PATCH 2/2] Add OpenBSD header guard around setsockopt(2)

---
deps/hiredis/net.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/deps/hiredis/net.c b/deps/hiredis/net.c
index 7d412098..206d3048 100644
--- a/deps/hiredis/net.c
+++ b/deps/hiredis/net.c
@@ -141,7 +141,7 @@ int redisKeepAlive(redisContext *c, int interval) {
return REDIS_ERR;
}
#else
-#if defined(__GLIBC__) && !defined(__FreeBSD_kernel__)
+#if defined(__GLIBC__) && !defined(__FreeBSD_kernel__) && !defined(__OpenBSD__)
val = interval;
if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPIDLE, &val, sizeof(val)) < 0) {
__redisSetError(c,REDIS_ERR_OTHER,strerror(errno));
--
2.19.1
--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+***@googlegroups.com.
To post to this group, send email to redis-***@googlegroups.com.
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
Klemens Nanni
2018-11-23 13:29:45 UTC
Permalink
Post by Klemens Nanni
1: https://github.com/antirez/redis/issues/3687
To drop local modifications in our port, I'd be happy to see this diff
merged upstream.
Any form of feedback is really appreciated.
Anyone?

Newest patch attached this time.
--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+***@googlegroups.com.
To post to this group, send email to redis-***@googlegroups.com.
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
Loading...