Bug 271700 - cc with rpc/pmap_prot.h and machine/pmap.h: different structures with the same name are used.
Summary: cc with rpc/pmap_prot.h and machine/pmap.h: different structures with the sam...
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: misc (show other bugs)
Version: 13.1-RELEASE
Hardware: amd64 Any
: --- Affects Many People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-05-29 05:54 UTC by Leo Vlassov
Modified: 2023-05-31 08:57 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Leo Vlassov 2023-05-29 05:54:02 UTC
at 13.1 and 13.2 OS versions

%: cc -c superbl.c
In file included from superbl.c:22:
In file included from /usr/include/rpc/rpc.h:74:
/usr/include/rpc/pmap_prot.h:90:8: error: redefinition of 'pmap'
struct pmap {
       ^
/usr/include/machine/pmap.h:380:8: note: previous definition is here
struct pmap {
       ^
1 error generated. 

#####
In rpc/pmap_prot.h:90:8: the structure `pmap' is different of machine/pmap.h the structure `pmap'....


It's a bug? -- different structures with the same name are used.
Comment 1 Konstantin Belousov freebsd_committer freebsd_triage 2023-05-29 09:51:59 UTC
Why it matter?  What is the kind of program that needs both machine/pmap.h
and port mapper services used in the same source?
Comment 2 Mina Galić freebsd_triage 2023-05-31 08:57:59 UTC
note that line 90 here https://github.com/freebsd/freebsd-src/blob/dc103686348d3205733a2c77e7d2ccbff6691022/sys/rpc/pmap_prot.h#L90 is "struct pirtmap" not "struct pmap" so something in your software is probably redefining portmap as pmap