Permalink
Browse files

Workaround rev 1.11 of libmetrics.h. It turns out that sys/user.h and

rpc/rpc.h are incompatable on FreeBSD due to both leading (through a
tangled maze of #includes) to definitions of entierly different struct
pmap's.  This hack causes sys/user.h's include of vm/pmap.h to be mostly
a no-op.
  • Loading branch information...
1 parent 6eafb2a commit 3708c3102c0cc3a988cc9bdf6d593cfd803446ff brooks_en_davis committed Apr 14, 2006
Showing with 6 additions and 0 deletions.
  1. +6 −0 monitor-core/srclib/libmetrics/freebsd/metrics.c
@@ -18,6 +18,12 @@
#include <sys/mount.h>
#include <sys/sysctl.h>
#include <sys/time.h>
+/*
+ * XXX: HACK HACK HACK - avoid including machine/pmap.h and things that
+ * depend on it to avoid collision with struct pmap in rpc/pmap_prot.h. :-P
+ */
+#define _MACHINE_PMAP_H_
+#define _VM_MAP_
#include <sys/user.h>
#if __FreeBSD_version < 500101
#include <sys/dkstat.h>

0 comments on commit 3708c31

Please sign in to comment.