public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* socket.h / in.h
@ 2003-02-05  2:46 dark rotter
  2003-02-05  7:17 ` Alexey V. Neyman
  0 siblings, 1 reply; 2+ messages in thread
From: dark rotter @ 2003-02-05  2:46 UTC (permalink / raw)
  To: gcc-help

hello....


well.. i'm trying create a socket, but when i include
some lib's like:
#include <sys/socket.h>
#include <netinet/in.h>

my program don't compile. how i fix this errors ?



freebsd# gcc teste.c -o teste
In file included from teste.c:3:
/usr/include/sys/socket.h:52: syntax error before
`sa_family_t'
/usr/include/sys/socket.h:52: warning: data definition
has no type or storage class
/usr/include/sys/socket.h:163: syntax error before
`u_char'
/usr/include/sys/socket.h:174: syntax error before
`u_short'
/usr/include/sys/socket.h:188: syntax error before
`u_char'
/usr/include/sys/socket.h:190: `int64_t' undeclared
here (not in a function)
/usr/include/sys/socket.h:190: `u_char' undeclared
here (not in a function)
/usr/include/sys/socket.h:190: size of array
`__ss_pad1' is too large
........
In file included from /usr/include/netinet/in.h:467,
                 from teste.c:4:
/usr/include/netinet6/in6.h:122: syntax error before
`u_int8_t'
/usr/include/netinet6/in6.h:144: syntax error before
`u_int8_t'
/usr/include/netinet6/in6.h:149: syntax error before
`u_int32_t'
/usr/include/netinet6/in6.h:612: syntax error before
`*'
/usr/include/netinet6/in6.h:614: syntax error before
`*'
/usr/include/netinet6/in6.h:614: warning: data
definition has no type or storage class
.........


gcc -v
Using builtin specs.
gcc version 2.95.3 20010315 (release) [FreeBSD-4.6]



tkz for all!


Augusto Flavio

__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: socket.h / in.h
  2003-02-05  2:46 socket.h / in.h dark rotter
@ 2003-02-05  7:17 ` Alexey V. Neyman
  0 siblings, 0 replies; 2+ messages in thread
From: Alexey V. Neyman @ 2003-02-05  7:17 UTC (permalink / raw)
  To: dark rotter, gcc-help

Hello,

On 5 February 2003 05:46, dark rotter wrote:
> well.. i'm trying create a socket, but when i include
> some lib's like:
> #include <sys/socket.h>
> #include <netinet/in.h>

On FreeBSD, you need to include <sys/types.h> prior to all networking 
headers. It is well-described in its man pages, e.g. socket(2).

Regards,
Alexey.

-- 
,----------------------------------------,
| A quoi ca sert d'etre sur la terre     | Alexey V. Neyman
| Si c'est pour faire nos vies a genoux! | mailto:alex.neyman@auriga.ru
`------------------( Les Rois du Monde )-'

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-02-05  7:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-05  2:46 socket.h / in.h dark rotter
2003-02-05  7:17 ` Alexey V. Neyman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).