From 2e4c857a5a5177fe0980dfd6abeef1ca3f061487 Mon Sep 17 00:00:00 2001 From: Julian Petrov Date: Wed, 27 Jul 2022 13:04:09 -0400 Subject: [PATCH] u/process: Make u_process work on non-linux systems --- src/xrt/auxiliary/util/u_process.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/src/xrt/auxiliary/util/u_process.c b/src/xrt/auxiliary/util/u_process.c index 5e81624b2..ed8c3b2af 100644 --- a/src/xrt/auxiliary/util/u_process.c +++ b/src/xrt/auxiliary/util/u_process.c @@ -22,19 +22,9 @@ #include #include -#include "u_misc.h" #include "u_file.h" #include "u_logging.h" -struct u_process -{ -#ifdef XRT_HAVE_LIBBSD - struct pidfh *pfh; -#else - int pid; -#endif -}; - XRT_MAYBE_UNUSED static inline int get_pidfile_path(char *buf) { @@ -46,6 +36,19 @@ get_pidfile_path(char *buf) return 0; } +#endif + +#include "u_misc.h" + +struct u_process +{ +#ifdef XRT_HAVE_LIBBSD + struct pidfh *pfh; +#else + int pid; +#endif +}; + struct u_process * u_process_create_if_not_running() { @@ -101,5 +104,3 @@ u_process_destroy(struct u_process *proc) #endif free(proc); } - -#endif