/usr/lib/gcc/i586-suse-linux/4.1.2/../../../../i586-suse-linux/bin/ld: errno: TLS definition in /lib/libc.so.6 section .tbss mismatches non-TLS reference in \
/tmp/ccox5xu2.o
/lib/libc.so.6: could not read symbols: Bad value
Diagnosis:
Link error
Analysis:
/usr/include/unistd.h includes features.h which is using errno.h
So errno.h should be included.
Solution:
(Final)
#include
(Temporary)
gcc -include /usr/include/errno.h code.c
Reference:
http://www.robotercoding.com/blog/?p=36 http://blog.chinaunix.net/u1/36607/showart_313647.html