[DragonFlyBSD - Bug #1618] (Feedback) collision for 'struct pmap' when using RPC and <sys/user.h>

bugtracker-admin at leaf.dragonflybsd.org bugtracker-admin at leaf.dragonflybsd.org
Mon Jan 19 03:13:23 PST 2015

Issue #1618 has been updated by tuxillo.

Description updated
Category set to Userland
Status changed from New to Feedback
Assignee deleted (0)
Target version set to 4.2.x


Since this bug report was opened we've changed from pkgsrc to a custom FreeBSD ports solution which is called Dports.
In Dports we have :

andromeda# pkg search ganglia

Also you mention a workaround was introduced in DragonFly but I am unable to find it, can you point it to me?

Antonio Huete

Bug #1618: collision for 'struct pmap' when using RPC and <sys/user.h>

* Author: carenas
* Status: Feedback
* Priority: Normal
* Assignee: 
* Category: Userland
* Target version: 4.2.x
resulting on the following FTBS for ganglia monitoring on recent versions of
DragonFlyBSD (confirmed with 2.4.1 and also

  libtool: compile:  gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -I.. -I../../include -g -O2 -Wall -MT metrics.lo -MD -MP -MF .deps/metrics.Tpo -c metrics.c  -fPIC -D PIC -o .libs/metrics.o                                                         In file included from /usr/include/rpc/rpc.h:73,
                   from ../libmetrics.h:14,
                   from metrics.c:36:
  /usr/include/rpc/pmap_prot.h:89: error: redefinition of 'struct pmap'

the problem isn't specific to ganglia though as it comes from a conflict
from the system headers :

  /usr/include/machine/pmap.h  (pulled from sys/user.h)
  /usr/include/rpc/pmap_prot.h (pulled from rpc/rpc.h)

FreeBSD has also a similar problem which is worked around by removing that
header and their dependents from the include before including <sys/user.h>

  #define _MACHINE_PMAP_H_
  #define _VM_MAP_
  #include <sys/user.h>

and as a similar workaround the following has been implemented for DFBSD

   * 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
  #define _MACHINE_PMAP_H_
  #define _VM_VM_MAP_H_
  #include <sys/user.h>

this problem was introduced around release of 2.4.0 as previous releases
didn't have any conflicts.


You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account

More information about the Bugs mailing list