From 884c1416b302e9d855453d8e83cc09e54796a434 Mon Sep 17 00:00:00 2001 From: Kenny Levinsen Date: Tue, 22 Sep 2020 01:12:33 +0200 Subject: meson: Make default seatd socket path configurable FreeBSD and Linux have different preferred socket locations. Expose an option to set the location, and implement simple auto-logic for linux/freebsd. --- libseat/backend/seatd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libseat') diff --git a/libseat/backend/seatd.c b/libseat/backend/seatd.c index b0e023f..1259308 100644 --- a/libseat/backend/seatd.c +++ b/libseat/backend/seatd.c @@ -67,9 +67,9 @@ static int seatd_connect(void) { close(fd); return -1; } - char *path = getenv("SEATD_SOCK"); + const char *path = getenv("SEATD_SOCK"); if (path == NULL) { - path = "/run/seatd.sock"; + path = SEATD_DEFAULTPATH; } addr.unix.sun_family = AF_UNIX; strncpy(addr.unix.sun_path, path, sizeof addr.unix.sun_path); -- cgit v1.2.3