[PATCH v3] server: implement vm counters on FreeBSD
Try 3 uses libprocstat in a new file, procstat.c (just like Solaris's procfs.c), which allows greater control over the included headers, so the duplicate definition of 'struct thread' can be avoided. Signed-off-by: Damjan Jovanovic <damjan.jov(a)gmail.com> --- server/Makefile.in | 3 +- server/process.c | 7 ++-- server/process.h | 4 +++ server/procstat.c | 83 ++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 94 insertions(+), 3 deletions(-) create mode 100644 server/procstat.c
Damjan Jovanovic <damjan.jov(a)gmail.com> writes:
Try 3 uses libprocstat in a new file, procstat.c (just like Solaris's procfs.c), which allows greater control over the included headers, so the duplicate definition of 'struct thread' can be avoided.
The usual way to handle that sort of thing is to #define/#undef the conflicting symbol around the system header. Something like: #define thread __unix_thread #include <sys/proc.h> #undef thread -- Alexandre Julliard julliard(a)winehq.org
participants (2)
-
Alexandre Julliard -
Damjan Jovanovic