# where is u_int32_t defined?



## ta0kira (Jan 6, 2010)

I've been programming on Linux for several years, but I'm pretty new to FreeBSD. In *<netinet/in.h>* the macro *INADDR_LOOPBACK* uses the type *u_int32_t*; however, some other header must be included for that typedef and I don't know which one. My solution at the moment is to *#define u_int32_t uint32_t* in case it's already defined as a typedef on some other machine that I wish to compile on (solves the problem where it exists and it's still safe where there isn't a problem.) I grepped the entire tree of /usr/include and nothing seems to define it. FreeBSD 8.0 amd64, in case you're wondering, but it's been a problem on previous releases. Thanks!
Kevin Barry


----------



## crsd (Jan 6, 2010)

[cmd=""]egrep -r 'typedef.*u_int32_t;' /usr/include/[/cmd]


----------



## ta0kira (Jan 6, 2010)

Thanks. For some reason I thought [CMD=].+[/CMD] (which I used in a similar search) wasn't an extended expression. Seems silly in retrospect.
Kevin Barry


----------



## redbrain (Feb 10, 2010)

stdint.h? Not sure thats a bit random u_int32_t lol why don't they just use the more common uint32_t


----------

