summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGary Kramlich <grim@reaperworld.com>2019-10-13 05:58:32 -0500
committerGary Kramlich <grim@reaperworld.com>2019-10-13 05:58:32 -0500
commite7abf9ed600ea43bd4e3b8130da2c80f19be1120 (patch)
treebfa8b2440b3d9a43939fdd2d762647ac31d90e5e
parentecdbeffb87ea02a7f305bc25bc79300706fe39c0 (diff)
downloadpidgin-e7abf9ed600ea43bd4e3b8130da2c80f19be1120.tar.gz
usr/include/dispatch/dispatch.h on macos has a bad macro test that requires HAVE_UNISTD_H to have a value, this works around it.
-rw-r--r--pidgin/gtkidle.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/pidgin/gtkidle.c b/pidgin/gtkidle.c
index eb71cf1c4f..3347be929a 100644
--- a/pidgin/gtkidle.c
+++ b/pidgin/gtkidle.c
@@ -24,9 +24,16 @@
#include "gtkidle.h"
#ifdef HAVE_IOKIT
-# ifndef HAVE_UNISTD_H
-# define HAVE_UNISTD_H
+/* HAVE_UNISTD_H must have a value, see
+ * https://forums.developer.apple.com/thread/86887
+ */
+# ifdef HAVE_UNISTD_H
+# undef HAVE_UNISTD_H
+# define HAVE_UNISTD_H 1
+# else
+# define HAVE_UNISTD_H 0
# endif
+
# include <CoreFoundation/CoreFoundation.h>
# include <IOKit/IOKitLib.h>
#elif defined (_WIN32)