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

Compiling with libc5



Hi,

As suggested I installed altgcc package and still could not compile the
program. The compiler complains about the undefined size of a variable.
I traced this to struct fd_set. The following code compiles on a bo box,
but not on a hamm box.

#include <stdio.h>
#include <sys/time.h>

int main(void)
{
  struct fd_set dummy ;

  printf("Size of fd_set is = %d\n", sizeof(dummy)) ;
  return 0 ;
}

On the bo box, the above code compiles and I get an answer of 128. I used
the following commands on a hamm box with the same results:

   /usr/bin/i486-linuxlibc1-gcc foo.c

 and

  /usr/bin/i486-linuxlibc1-gcc -nostdinc -I /usr/i486-linuxlibc1/include \
    -I /usr/lib/gcc-lib/i486-linuxlibc1/2.7.2.2/include foo.c

 In both the cases, the message is the same :

   foo.c: In function `main':
   foo.c:6: storage size of `test' isn't known

Is there anything that I am missing?

Thanks,

sridhar



Reply to: