From: Michalis Pappas Date: Tue, 18 Mar 2025 10:16:59 +0000 (+0100) Subject: lib/posix-process: Make header definitions conditional to PIDS X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=a1a401ccc5d21c1e0c320220d96694a82060f0d7;p=unikraft%2Funikraft.git lib/posix-process: Make header definitions conditional to PIDS Make definitions in private process.h conditional to CONFIG_LIBPOSIX_PROCESS_PIDS to prevent compile errors if that header is if that header is included by files compiled unconditionally to CONFIG_LIBPOSIX_PROCESS_PIDS. Signed-off-by: Michalis Pappas Reviewed-by: Ioan-Teodor Teugea Reviewed-by: Sergiu Moga Reviewed-by: Andrei Tatar Approved-by: Andrei Tatar GitHub-Closes: #1248 --- diff --git a/lib/posix-process/process.h b/lib/posix-process/process.h index f08685c8f..d214a8e3f 100644 --- a/lib/posix-process/process.h +++ b/lib/posix-process/process.h @@ -43,7 +43,6 @@ #if CONFIG_LIBPOSIX_PROCESS_PIDS #include -#endif /* CONFIG_LIBPOSIX_PROCESS_PIDS */ #define TIDMAP_SIZE (CONFIG_LIBPOSIX_PROCESS_MAX_PID + 1) @@ -111,16 +110,15 @@ extern __uk_tls struct posix_thread *pthread_self; #define uk_pprocess_current() \ uk_pthread_current()->process -#if CONFIG_LIBPOSIX_PROCESS_PIDS struct posix_process *pid2pprocess(pid_t pid); struct uk_thread *tid2ukthread(pid_t tid); struct posix_thread *tid2pthread(pid_t tid); struct posix_process *tid2pprocess(pid_t tid); pid_t ukthread2tid(struct uk_thread *thread); pid_t ukthread2pid(struct uk_thread *thread); -#endif /* CONFIG_LIBPOSIX_PROCESS_PIDS */ void pprocess_kill_siblings(struct uk_thread *thread); +#endif /* CONFIG_LIBPOSIX_PROCESS_PIDS */ #if CONFIG_LIBPOSIX_PROCESS_CLONE int uk_clone(struct clone_args *cl_args, size_t cl_args_len,