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 
definition.

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

M2c.

Christian

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

Hello,

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.

Thanks.

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

_______________________________________________
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel


_______________________________________________
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to