From 343c23ce9c7aab291721d671fe5504e7bdbfd3c2 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Thu, 17 Nov 2022 12:36:20 +0100 Subject: Don't check for O_PATH being defined O_PATH has been in Linux since version 2.6.39, which was a very long time ago. Additionally, this library only works on Linux anyways since the interface to backlight information is Linux-specific. Therefore we have no real reason to bother with handling the case where it's not defined. --- src/luxinit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/luxinit.c') diff --git a/src/luxinit.c b/src/luxinit.c index 55151b4..b5b2b84 100644 --- a/src/luxinit.c +++ b/src/luxinit.c @@ -64,7 +64,7 @@ getdir(void) if ((dp = readdir(dir)) == NULL || (dp = readdir(dir)) == NULL || (dp = readdir(dir)) == NULL - || (fd = openat(dfd, dp->d_name, LUX_GDIR_FLAGS)) == -1) + || (fd = openat(dfd, dp->d_name, O_PATH)) == -1) fd = -1; close(dfd); -- cgit v1.2.3