building libtorrent error: 'u_int16_t' does not name a type

Lowell Gilbert freebsd-questions-local at
Tue Feb 19 20:56:29 UTC 2013

David Collins <davidcollins001 at> writes:

> I'm trying to build libtorrent/rtorrent using gcc 4.8. The reason I'm
> using gcc 4.8 rather than the version in base is because there is
> apparently a bug in gcc 4.2 - 

You do realize that the bug was worked around in the libtorrent sources
as well, right? So that the using the port without tinkering with its
compiler usage will work just fine, and has done for many years?

> I installed gcc 4.8 based on these instructions
> replacing 44 for 48 where neccessary. While building I get the
> errors below.
> Have I missed something while installing gcc 4.8? Or does anyone have an ideas
> about how to fix this?

Well, the errors look like stdint.h isn't getting included properly. Or
that's what I'd say in a C file; C++ has some differences in this area,
although I think most implementations support the C-style types. This
could well be a major porting exercise. My advice would be: don't do
that -- it's what ports are for in the first place.

More information about the freebsd-questions mailing list