Created attachment 147423 [details] Patch. I already sent this patch to the hackers mailing list and added this bug report on request: http://lists.freebsd.org/pipermail/freebsd-hackers/2014-September/046091.html We ported the FreeBSD network stack to RTEMS. Some users want to write network interface drivers in C++. It would be nice if we can make some FreeBSD kernel headers C++ compatible. sys/buf_ring.h: Mabye it is better to fix the integer type of br_cons_head to be able to use it in atomic_cmpset_int(). sys/mbuf.h: Maybe it is better to fix the integer type of ext_cnt to be able to use it for uma_find_refcnt().