diff --git a/start-stop-daemon.c b/start-stop-daemon.c
index 178c788..77f0ba0 100644
--- a/start-stop-daemon.c
+++ b/start-stop-daemon.c
@@ -44,6 +44,8 @@
 #  define OSFreeBSD
 #elif defined(__NetBSD__)
 #  define OSNetBSD
+#elif defined(__APPLE__)
+#  define OSApple
 #else
 #  error Unknown architecture - cannot build start-stop-daemon
 #endif
@@ -63,8 +65,11 @@
 #include <ps.h>
 #endif
 
-#if defined(OSOpenBSD) || defined(OSFreeBSD) || defined(OSNetBSD)
+#if defined(OSOpenBSD) || defined(OSFreeBSD) || defined(OSNetBSD) || defined(OSApple)
 #include <sys/param.h>
+#ifdef OSApple
+#include <sys/time.h>   /* Need struct itimerval before including sys/proc.h */
+#endif /* OSApple */
 #include <sys/proc.h>
 
 #include <err.h>
@@ -633,12 +638,14 @@ static void
 set_proc_schedule(struct res_schedule *sched)
 {
 #ifdef _POSIX_PRIORITY_SCHEDULING
+#if !defined(OSApple)
     struct sched_param param;
 
     param.sched_priority = sched->priority;
 
     if (sched_setscheduler(getpid(), sched->policy, &param) == -1)
         fatal("unable to set process scheduler");
+#endif /* !OSApple */
 #endif
 }
 
@@ -1224,10 +1231,12 @@ check(pid_t pid)
     if (execname && !pid_is_cmd(pid, execname))
         return;
 #endif
+#if !defined(OSApple)
     if (userspec && !pid_is_user(pid, user_id))
         return;
     if (cmdname && !pid_is_cmd(pid, cmdname))
         return;
+#endif  /* !OSApple */
     if (start && !pid_is_running(pid))
         return;
     push(&found, pid);
@@ -1307,7 +1316,7 @@ do_procinit(void)
         idx = pst[count - 1].pst_idx + 1;
     }
 }
-#elif defined(HAVE_KVM_H)
+#elif defined(HAVE_KVM_H) || defined(OSApple)
 static void
 do_procinit(void)
 {
