utils: include unistd.h where we have it
authorPeter Hutterer <peter.hutterer@who-t.net>
Mon, 7 Sep 2020 09:49:36 +0000 (19:49 +1000)
committerRan Benita <ran@unusedvar.com>
Mon, 7 Sep 2020 19:01:57 +0000 (22:01 +0300)
MacOS doesn't have eaccess/euidaccess but it does have unistd.h, so let's
include it to silence the R_OK redefinition compiler warnings.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
src/utils.h

index d9827c0..cd3e9b1 100644 (file)
@@ -30,7 +30,7 @@
 #include <stdbool.h>
 #include <stdio.h>
 #include <string.h>
-#if defined(HAVE_EACCESS) || defined(HAVE_EUIDACCESS)
+#if HAVE_UNISTD_H
 #include <unistd.h>
 #else
 /* Required on Windows where unistd.h doesn't exist */