mirror of
https://github.com/lbgos/rift-s-linux.git
synced 2026-10-29 04:02:05 +01:00
u/process: Make u_process work on non-linux systems
This commit is contained in:
1 parent
c7a5a0bc1b
commit
2e4c857a5a
1 file changed
+13
-12
@@ -22,19 +22,9 @@
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdbool.h>
|
||||
#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
|
||||
Reference in new issue
Block a user