(Answer) (Category) Linux on PowerPC FAQ-O-Matic : (Category) Languages and Compilers :
I get compiler errors in netinet/in.h or linux/in.h (glibc-1.99, kernel-2.1.x)
If you are running a recent 2.1.x kernel (say x > 90), and glibc-1.99 (as used in linuxppc-R4), and you get compile time errors like this:
 /usr/include/netinet/in.h:87: field `ip_dst' has incomplete type
 (other likely errors include "linux/in.h: parse error before 'sa_family_t'")
The problem is that glibc-1.99 claims to be glibc-2, and the kernel headers refrain from declaring certain things if glibc-2 is in use. The easiest solution is to patch the glibc headers to not think they are glibc-2:
 --- /usr/include/features.h.orig        Sun Aug 16 18:21:00 1998
 +++ /usr/include/features.h     Wed Nov 18 16:18:01 1998
 @@ -176,7 +176,7 @@
  
  /* Major and minor version number of the GNU C library package.  Use
     these macros to test for features in specific releases.  */
 -#define        __GLIBC__       2
 +#define        __GLIBC__       1
  #define        __GLIBC_MINOR__ 0
 
Once you switch to a real glibc-2.1 -based system (linuxppc R5, debian) this won't be necessary (and would in fact be bad).
warner@lothar.com
[Append to This Answer]
Previous: (Answer) Using egcs-1.1 with linuxppc R4 and mklinux DR3
Next: (Category) How to compile a new kernel
This document is: http://www.jonh.net/cgi-bin/lppcfom/fom?file=501
[Search] [Appearance]
This is a Faq-O-Matic 2.717d.
Hosted by anduin.org and SourceForge Logo