Project

General

Profile

Actions

Bug #1618

open

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

Added by carenas almost 15 years ago. Updated over 3 years ago.

Status:
Feedback
Priority:
Normal
Assignee:
-
Category:
Userland
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

resulting on the following FTBS for ganglia monitoring on recent versions of
DragonFlyBSD (confirmed with 2.4.1 and also 2.5.1.302.gc4e67-DEVELOPMENT)

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 &lt;sys/user.h&gt;

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 &lt;sys/user.h&gt;

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

Carlo

Actions

Also available in: Atom PDF