this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Modify launchd to build for Darling

+17 -6
+5 -5
src/launchd/src/config.h
··· 3 3 4 4 #include <TargetConditionals.h> 5 5 6 - #if __has_include(<quarantine.h>) 6 + #if __has_include(<quarantine.h>) && !defined(DARLING) 7 7 #define HAVE_QUARANTINE 1 8 8 #else 9 9 #define HAVE_QUARANTINE 0 10 10 #endif 11 11 12 - #if __has_include(<responsibility.h>) 12 + #if __has_include(<responsibility.h>) && !defined(DARLING) 13 13 #define HAVE_RESPONSIBILITY 1 14 14 #else 15 15 #define HAVE_RESPONSIBILITY 0 16 16 #endif 17 17 18 - #if __has_include(<sandbox.h>) 18 + #if __has_include(<sandbox.h>) && !defined(DARLING) 19 19 #define HAVE_SANDBOX 1 20 20 #else 21 21 #define HAVE_SANDBOX 0 22 22 #endif 23 23 24 - #define HAVE_LIBAUDITD !TARGET_OS_EMBEDDED 24 + #define HAVE_LIBAUDITD !TARGET_OS_EMBEDDED && !defined(DARLING) 25 25 26 - #if !TARGET_OS_EMBEDDED && __has_include(<systemstats/systemstats.h>) 26 + #if !TARGET_OS_EMBEDDED && __has_include(<systemstats/systemstats.h>) && !defined(DARLING) 27 27 #define HAVE_SYSTEMSTATS 1 28 28 #else 29 29 #define HAVE_SYSTEMSTATS 0
+12 -1
src/launchd/src/core.c
··· 8092 8092 if (!j) { 8093 8093 return BOOTSTRAP_NO_MEMORY; 8094 8094 } 8095 - 8095 + #ifdef DARLING 8096 + if (!job_assumes(j, j->per_user != 0)) { 8097 + #else 8096 8098 if (!job_assumes(j, j->per_user)) { 8099 + #endif 8097 8100 return BOOTSTRAP_NOT_PRIVILEGED; 8098 8101 } 8099 8102 ··· 8396 8399 /* No-op. */ 8397 8400 break; 8398 8401 case VPROC_GSK_WEIRD_BOOTSTRAP: 8402 + #ifdef DARLING 8403 + if (job_assumes(j, j->weird_bootstrap != 0)) { 8404 + #else 8399 8405 if (job_assumes(j, j->weird_bootstrap)) { 8406 + #endif 8400 8407 job_log(j, LOG_DEBUG, "Unsetting weird bootstrap."); 8401 8408 8402 8409 mach_msg_size_t mxmsgsz = (typeof(mxmsgsz)) sizeof(union __RequestUnion__job_mig_job_subsystem); ··· 8555 8562 size_t cnt = 0; 8556 8563 struct machservice *msi = NULL; 8557 8564 SLIST_FOREACH(msi, &j->machservices, sle) { 8565 + #ifdef DARLING 8566 + if (msi->upfront && job_assumes(j, msi->recv != 0)) { 8567 + #else 8558 8568 if (msi->upfront && job_assumes(j, msi->recv)) { 8569 + #endif 8559 8570 cnt++; 8560 8571 } 8561 8572 }