Commit d327475282d03516c364442f3e6f0307d6fed0a5

Peter Hutterer 2020-09-07T19:49:36

utils: include unistd.h where we have it 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>

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/utils.h b/src/utils.h
index d9827c0..cd3e9b1 100644
--- a/src/utils.h
+++ b/src/utils.h
@@ -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 */