misc/137443: Including /usr/include/rpc/xdr.h fails with C++

Stas Timokhin stast at bsdportal.ru
Wed Aug 5 04:10:04 UTC 2009


>Number:         137443
>Category:       misc
>Synopsis:       Including /usr/include/rpc/xdr.h fails with C++
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Aug 05 04:10:03 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Stas Timokhin
>Release:        8.0-CURRENT
>Organization:
None
>Environment:
FreeBSD home.stasyan.com 8.0-CURRENT FreeBSD 8.0-CURRENT #0: Fri Jun 12 14:30:16 NOVST 2009     root at home.stasyan.com:/usr/src/sys/i386/compile/EASTERN200906  i386

>Description:
Building of C++ application (Salome) fail with current version rpc/xdr.h header:
====================
In file included from ../.././../src/Communication/Receivers.cxx:239,
                 from ../.././../src/Communication/Receivers.hxx:151,
                 from ../.././../src/Communication/ReceiverFactory.cxx:27:
/usr/include/rpc/xdr.h:125: error: conflicting declaration 'typedef struct __rpc_xdr XDR'
./.././../src/Communication/Receivers.hxx:127: error: 'struct XDR' has a previous declaration as 'struct XDR'
/usr/include/rpc/xdr.h: In function 'int xdr_getint32(XDR*, int32_t*)':
/usr/include/rpc/xdr.h:168: error: invalid use of incomplete type 'struct XDR'
./.././../src/Communication/Receivers.hxx:127: error: forward declaration of 'struct XDR'
/usr/include/rpc/xdr.h: In function 'int xdr_putint32(XDR*, int32_t*)':
/usr/include/rpc/xdr.h:180: error: invalid use of incomplete type 'struct XDR'
./.././../src/Communication/Receivers.hxx:127: error: forward declaration of 'struct XDR'
In file included from ../.././../src/Communication/Receivers.hxx:151,
======================



>How-To-Repeat:

>Fix:
Replace all "__rpc_xdr" to "XDR" in /usr/include/rpc/xdr.h in typedef struct  XDR.
C-applications (net/samba3, for example) and C++ applications (salome, not in ports yet) will be build OK.



>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list