[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] error: unknown type size with struct sockaddr_in sa

From: Christian Jullien
Subject: Re: [Tinycc-devel] error: unknown type size with struct sockaddr_in sa
Date: Fri, 27 Mar 2020 14:26:53 +0100

Hello Julio,

Many thanks for your interest in tcc.

Here is a good way to reproduce your error:

struct sockaddr;  // forward and incomplete declaration of sockaddr

void bar() {
        struct sockaddr foo;

$ tcc -c foo.c
foo.c:4: error: unknown type size

If this is really the same source of your problem, it looks that, for one 
reason or another, tcc has not include the .h which contains struct sockaddr 

For example, changing this sample with:

#include <sys/socket.h>
// struct sockaddr;
void bar() {
        struct sockaddr foo;

Solves the compilation issue. If bftpd uses configure, I advise you to check 
./configure log and see differences in config.h when this package is compiled 
with gcc and tcc. I bet they are different.
Sometimes, systems definitions rely on GCC specific macros like __GNU_something.

Tell us



-----Original Message-----
From: Tinycc-devel [mailto:tinycc-devel-bounces+eligis=address@hidden] On 
Behalf Of Julio Carchi
Sent: Friday, March 27, 2020 11:47
To: address@hidden
Subject: [Tinycc-devel] error: unknown type size with struct sockaddr_in sa


my name is Julio Carchi, and I am from Ecuador, I am trying to compile  
several things with TCC, I am using the latest rev on the mob branch of  
the repo.

This time I am compiling bftpd but in one of the files I am getting an  
error message:

commands.c:66 error: unknown type size

the line 66 is as follows:

66 struct sockaddr_in sa;

If I comment that line fails in a similar line below.

136     struct sockaddr foo;

I don't know if is a problem with TCC or incompatibility with GCC, so  
please let me know what is happening and how could I fix it.


Usando el cliente de correo de Opera: http://www.opera.com/mail/

Tinycc-devel mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]