extern "C" {
#include <lwext4/file_dev.h>
}
+#include <xpc/xpc.h>
#endif
#ifdef DCPOMATIC_LINUX
LOG_DISK_NC("dcpomatic_disk_writer started");
#endif
+#ifdef DCPOMATIC_OSX
+ /* I *think* this confumes the notifyd event that we used to start the process, so we only
+ * get started once per notification.
+ */
+ xpc_set_event_stream_handler("com.apple.notifyd.matching", DISPATCH_TARGET_QUEUE_DEFAULT, ^(xpc_object_t event) {});
+#endif
+
try {
nanomsg = new Nanomsg (false);
} catch (runtime_error& e) {