From: kaidoho <kho237...@gmx.de>

Dear all, I am using the latest RTEMS 6 tools and sources. When building a C++ 
application including libbsd I receive two errors from GCC.

The first one complains about the macro BITSET_DEFINE within 
freebsd/sys/sys/_domainset.h. I think this relates to a patch "sys/bitset.h: 
reduce visibility of BIT_* macros" within the freebsd source 
https://github.com/freebsd/freebsd-src/commit/5e04571cf3cf4024be926976a6abf19626df30be.
I ve simply changed BITSET_DEFINE to __BITSET_DEFINE as shown in the patch. 
This makes compilation work on my side, but there are a few other occurences of
BITSET_DEFINE within rtems and libbsd.

The second one is triggered by the function getrusage in 
rtemsbsd/include/bsd/sys/ressource.h.
There is a another declaration in include/sys/ressource.h provided with the 
toolchain.
Now, one has C Linkage the other one C++ Linkage which leads to a conflict. I 
ve simply made the one in libbsd invisible to the C++ compiler.

For both patches, I have no idea if this is really the way to go. Could someone 
with more insight have at look at it?


kaidoho (2):
  Use built-in macro definition
  Fix C++ visibilty of getrusage

 freebsd/sys/sys/_domainset.h              | 2 +-
 rtemsbsd/include/rtems/bsd/sys/resource.h | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

--
2.20.1.windows.1

_______________________________________________
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Reply via email to