cc: [email protected]
Subject: Re: [uwin-users] <sys/socket.h> and uintN_t types
--------
> Hello,
>
> I'm trying to compile a little piece of code usually working on unix systems :
>
> #include <sys/types.h>
> #include <sys/socket.h>
> #include <netinet/in.h>
> #include <unistd.h>
>
> int
> main(void)
> {
> int fd;
> struct sockaddr_in sin;
>
>
> }
>
> I try to use MinGW as compiler so I've run
> export PACKAGE_cc=/C/MinGW
>
> and then cc socket.c fails with :
>
> In file included from socket.c:3:0,
> from socket.c:2:
> /usr/include/sys/socket.h:141:2: error: unknown type name 'u_int8_t'
> /usr/include/sys/socket.h:144:2: error: unknown type name 'u_int64_t'
> In file included from /usr/include/netinet/in.h:212:0,
> from socket.c:4,
> from socket.c:2:
> /usr/include/netinet6/in6.h:116:3: error: unknown type name 'u_int8_t'
> /usr/include/netinet6/in6.h:117:3: error: unknown type name 'u_int16_t'
> /usr/include/netinet6/in6.h:118:3: error: unknown type name 'u_int32_t'
> /usr/include/netinet6/in6.h:119:3: error: unknown type name 'u_int64_t'
> In file included from /usr/include/netinet/in.h:212:0,
> from socket.c:4,
> from socket.c:2:
> /usr/include/netinet6/in6.h:135:2: error: unknown type name 'u_int32_t'
> /usr/include/netinet6/in6.h:137:2: error: unknown type name 'u_int32_t'
> In file included from /usr/include/netinet/in.h:212:0,
> from socket.c:4,
> from socket.c:2:
> /usr/include/netinet6/in6.h:336:2: error: unknown type name 'u_int32_t'
>
> I also tried -D_BSDCOMPAT too.
>
> Cheers,
>
The cc wrapper hasn't been updated to work with MingW for around 4 years
even though it is on our todo list. You need to used our cc command on
top of MVSC. Fortuately, Microsoft now allows you do freely download
Visual C/C++. If you do this you should be able to compile your program.
David Korn
[email protected]
_______________________________________________
uwin-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/uwin-users