--- configure.orig	2017-03-23 09:32:23.000000000 -0400
+++ configure	2017-03-23 09:40:25.000000000 -0400
@@ -11149,26 +11149,26 @@
 
 # checks for library functions
 for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
- clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
- fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
- futimens futimes gai_strerror getentropy \
+ clock confstr ctermid dup3 execv fchmod fchown \
+ fexecve fork fpathconf ftime ftruncate futimesat \
+ futimens futimes gai_strerror \
  getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
  getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
  if_nameindex \
- initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
- memrchr mbrtowc mkdirat mkfifo \
- mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
+ initgroups kill killpg lchmod lchown lockf lstat lutimes mmap \
+ memrchr mbrtowc mkfifo \
+ mkfifoat mknod mknodat mktime mremap nice pathconf pause pipe2 plock poll \
  posix_fallocate posix_fadvise pread \
- pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
+ pthread_init pthread_kill putenv pwrite readlink readv realpath \
  select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
  setgid sethostname \
  setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
  sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
  sched_rr_get_interval \
  sigaction sigaltstack siginterrupt sigpending sigrelse \
- sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
+ sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy sync \
  sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
- truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
+ truncate uname unsetenv utimensat utimes waitid waitpid wait3 wait4 \
  wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
 do :
   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -11181,6 +11181,23 @@
 fi
 done
 
+if test "`uname -s`" != "Darwin"
+then
+  # checks for library functions
+  for ac_func in faccessat fchmodat fchownat \
+    fdopendir fstatat getentropy linkat mkdirat openat readlinkat renameat \
+    symlinkat unlinkat
+  do :
+    as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+  ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+  if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+    cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+  fi
+  done
+fi
 
 ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
        #include <dirent.h>
@@ -12383,7 +12400,8 @@
 fi
 done
 
-
+if test "`uname -s`" != "Darwin"
+then
 for ac_func in clock_gettime
 do :
   ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
@@ -12444,8 +12462,10 @@
 
 fi
 done
+fi
 
-
+if test "`uname -s`" != "Darwin"
+then
 for ac_func in clock_getres
 do :
   ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
@@ -12502,7 +12522,7 @@
 
 fi
 done
-
+fi
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
 $as_echo_n "checking for major... " >&6; }
--- configure.ac.orig	2017-03-23 09:32:33.000000000 -0400
+++ configure.ac	2017-03-23 09:36:22.000000000 -0400
@@ -3270,28 +3270,36 @@
 
 # checks for library functions
 AC_CHECK_FUNCS(alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
- clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
- fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
- futimens futimes gai_strerror getentropy \
+ clock confstr ctermid dup3 execv fchmod fchown \
+ fexecve fork fpathconf ftime ftruncate futimesat \
+ futimens futimes gai_strerror \
  getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
  getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
  if_nameindex \
- initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
- memrchr mbrtowc mkdirat mkfifo \
- mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
+ initgroups kill killpg lchmod lchown lockf lstat lutimes mmap \
+ memrchr mbrtowc mkfifo \
+ mkfifoat mknod mknodat mktime mremap nice pathconf pause pipe2 plock poll \
  posix_fallocate posix_fadvise pread \
- pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
+ pthread_init pthread_kill putenv pwrite readlink readv realpath \
  select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
  setgid sethostname \
  setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
  sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
  sched_rr_get_interval \
  sigaction sigaltstack siginterrupt sigpending sigrelse \
- sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
+ sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy sync \
  sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
- truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
+ truncate uname unsetenv utimensat utimes waitid waitpid wait3 wait4 \
  wcscoll wcsftime wcsxfrm wmemcmp writev _getpty)
 
+if test "`uname -s`" != "Darwin"
+then
+  # checks for library functions
+  AC_CHECK_FUNCS(faccessat fchmodat fchownat \
+      fdopendir fstatat getentropy linkat mkdirat openat readlinkat renameat \
+      symlinkat unlinkat)
+fi
+
 AC_CHECK_DECL(dirfd,
     AC_DEFINE(HAVE_DIRFD, 1,
               Define if you have the 'dirfd' function or macro.), ,
@@ -3588,20 +3596,26 @@
     ])
 )
 
-AC_CHECK_FUNCS(clock_gettime, [], [
-    AC_CHECK_LIB(rt, clock_gettime, [
-        LIBS="$LIBS -lrt"
-        AC_DEFINE(HAVE_CLOCK_GETTIME, 1)
-        AC_DEFINE(TIMEMODULE_LIB, [rt],
-                  [Library needed by timemodule.c: librt may be needed for clock_gettime()])
-    ])
-])
+if test "`uname -s`" != "Darwin"
+then
+  AC_CHECK_FUNCS(clock_gettime, [], [
+      AC_CHECK_LIB(rt, clock_gettime, [
+          LIBS="$LIBS -lrt"
+          AC_DEFINE(HAVE_CLOCK_GETTIME, 1)
+          AC_DEFINE(TIMEMODULE_LIB, [rt],
+                    [Library needed by timemodule.c: librt may be needed for clock_gettime()])
+      ])
+  ])
+fi
 
-AC_CHECK_FUNCS(clock_getres, [], [
-    AC_CHECK_LIB(rt, clock_getres, [
-        AC_DEFINE(HAVE_CLOCK_GETRES, 1)
-    ])
-])
+if test "`uname -s`" != "Darwin"
+then
+  AC_CHECK_FUNCS(clock_getres, [], [
+      AC_CHECK_LIB(rt, clock_getres, [
+          AC_DEFINE(HAVE_CLOCK_GETRES, 1)
+      ])
+  ])
+fi
 
 AC_MSG_CHECKING(for major, minor, and makedev)
 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
--- setup.py.orig	2017-01-16 19:30:36.000000000 -0500
+++ setup.py	2017-01-16 19:32:23.000000000 -0500
@@ -1731,7 +1731,7 @@
                         include_dirs = include_dirs,
                         libraries = [],
                         extra_compile_args = frameworks[2:],
-                        extra_link_args = frameworks,
+                        extra_link_args = ['-F/Library/Frameworks', '-F/System/Library/Frameworks'] + frameworks,
                         )
         self.extensions.append(ext)
         return 1
