--- configure.ac.orig	2016-06-09 07:17:02.000000000 -0700
+++ configure.ac	2016-06-13 05:16:10.000000000 -0700
@@ -193,6 +193,9 @@
 AC_CHECK_DECLS([WTMPX_FILENAME], [wtmpx_found="WTMPX_FILENAME"],
                [], [AC_INCLUDES_DEFAULT
 #include <utmpx.h>
+#ifdef __APPLE__
+#define WTMPX_FILENAME UTMPX_FILE
+#endif
                ])
 if test "$wtmpx_found" = "no" ; then
   AC_CHECK_DECLS([_PATH_WTMPX], [wtmpx_found="_PATH_WTMPX"],
--- src/wtmp-helper.c.orig	2014-05-21 11:13:14.000000000 -0700
+++ src/wtmp-helper.c	2014-05-21 11:25:37.000000000 -0700
@@ -29,6 +29,10 @@
 
 #include <utmpx.h>
 
+#ifdef __APPLE__
+#define WTMPX_FILENAME UTMPX_FILE
+#endif
+
 typedef struct {
         guint64 frequency;
         gint64 time;
