nanogui@linuxhacker.org

nanogui@linuxhacker.org


Subject: RE: Problems building nano-x for mips/everex
From: Simon Wood
Date: Mon, 26 Jun 2000 16:35:12 +0100

> -----Original Message-----
> From:	Greg Haerr [SMTP:greg@censoft.com]
> Sent:	Monday, June 26, 2000 4:29 PM
> To:	Simon Wood; nanogui@linuxhacker.org
> Subject:	Re: Problems building nano-x for mips/everex
> 
> : It appears that the kernel headers in the 'mipssel-linux' include
> : directories are arranged different to the i86 stuff and it's barfing
> with
> : 'SOCK_STREAM' stuff.
> : 
> : Can anyone confirm building (i.e. is it just me? ... it often is) or
> offer
> : any solution at this time?
> 
> This might be best answered by Alan, who lurks this list.  I solve
> the problem by changing my symbolic link /usr/src/linux to the
> new kernel directory before compiling (e.g. /usr/src/linux-arm)
> and then changing it back afterwards for host based compiles.
> Anyone know of a better way when the kernel includes differ?
	[Simon Wood]  
	fix has already posted.... 
Hi.

> It appears that the kernel headers in the 'mipssel-linux' include
> directories are arranged different to the i86 stuff and it's barfing with
> 'SOCK_STREAM' stuff.

Yes, that's true. I changed the headers in the crosscompiler before I could
be able to compile any network-related tool. The gurus report it as a known
problem.

Here's a segment I added to my
/usr/local/linuxce-softfloat/mipsel-linux/include/socketbits.h header:

/* Get socket manipulation related informations from kernel headers.  */
#ifndef _LINUX_TYPES_H
# define _LINUX_TYPES_H
#endif

#include <asm/socket.h>
#ifndef SOCK_DGRAM
#define SOCK_DGRAM 1            /* Connectionless, unreliable datagrams
                                   of fixed maximum length.  */
#define SOCK_STREAM 2           /* Sequenced, reliable, connection-based
                                   byte streams.  */
#define SOCK_RAW 3              /* Raw protocol interface.  */
#define SOCK_RDM 4              /* Reliably-delivered messages.  */
#define SOCK_SEQPACKET 5        /* Sequenced, reliable, connection-based,
                                   datagrams of fixed maximum length.  */
#define SOCK_PACKET 10          /* Linux specific way of getting packets at
                                   the dev level.  For writing rarp and
                                   other similar things on the user level.
*/
#endif /* SOCK_DGRAM */




hope this helps
/alessandro

nanogui@linuxhacker.org