From 8e87705c21ba09ec249fcdbdcb0c3eaa4a162091 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Fri, 12 Aug 2022 15:03:12 +0200 Subject: [PATCH] BUILD: sink: replace S_IRUSR, S_IWUSR with their octal value The build broke on freebsd with S_IRUSR undefined after commit 0b8e9ceb1 ("MINOR: ring: add support for a backing-file"). Maybe another include is needed there, but the point is that we really don't care about these symbolic names, file modes are more readable as 0600 than via these cryptic names anyway, so let's go back to 0600. This will teach me not to try to make things too clean. No backport is needed. --- src/sink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sink.c b/src/sink.c index 5432c4db7..ffb6cf1f9 100644 --- a/src/sink.c +++ b/src/sink.c @@ -862,7 +862,7 @@ int cfg_parse_ring(const char *file, int linenum, char **args, int kwm) goto err; } - fd = open(backing, O_RDWR | O_CREAT, S_IRUSR|S_IWUSR); + fd = open(backing, O_RDWR | O_CREAT, 0600); if (fd < 0) { ha_alert("parsing [%s:%d] : cannot open backing-file '%s' for ring '%s': %s.\n", file, linenum, backing, cfg_sink->name, strerror(errno)); err_code |= ERR_ALERT | ERR_FATAL;