stormalf / chibicc

A small C compiler from rui314
MIT License
6 stars 1 forks source link

ISS-146 compiling util-linux failed with variable has incomplete type on union variable #34

Open stormalf opened 1 year ago

stormalf commented 1 year ago

compiling util-linux failed with variable has incomplete type on union variable sys-utils/ipcrm.c:79: union semun arg; ^ parse.c: in declaration : variable has incomplete type

stormalf commented 1 year ago
Tested also with gcc and it's the same behaviour. The difference here is that ./configure with gcc detects that semun is not managed : / end confdefs.h. /
#include <sys/sem.h>
int
main (void)
{
if (sizeof (union semun))
return 0;
;
return 0;
}

configure:28441: result: no

and when executing configure with chibicc the result is yes : / end confdefs.h. /
#include <sys/sem.h>
int
main (void)
{
if (sizeof ((union semun)))
return 0;
;
return 0;
}

configure:28441: result: yes

stormalf commented 1 year ago

solving for now this issue on the project config.status file removing the HAVE_SEMUN variable.

stormalf commented 1 month ago

it will be fixed in 1.0.22.5.