lkml.org 
[lkml]   [1999]   [Jun]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectConflict in declaration of ntohs & C. ...

Hi guys,

I have kernel 2.3.6 & egcs 1.1.2 correctly installed on my system.
Compiling this sequence on includes:

#include <sys/types.h>
#include <sys/socket.h>
#include <sys/time.h>
#include <stdio.h>
#include <string.h>
#include <signal.h>
#include <linux/if.h>
#include <linux/socket.h>
#include <linux/ip.h>
#include <linux/tcp.h>
#include <linux/if_ether.h>
#include <netinet/in.h>
#include <netdb.h>
#include <arpa/inet.h>
#include <ioctls.h>

I get a conflicting declarations for ntohs() & C. in includes:

--> /usr/include/linux/byteorder/generic.h (which is a symlink to kernel includes)
extern unsigned long int ntohl(unsigned long int);
extern unsigned short int ntohs(unsigned short int);
extern unsigned long int htonl(unsigned long int);
extern unsigned short int htons(unsigned short int);

and:

--> /usr/include/netinet/in.h
extern u_int32_t ntohl __P ((u_int32_t __netlong));
extern u_int16_t ntohs __P ((u_int16_t __netshort));
extern u_int32_t htonl __P ((u_int32_t __hostlong));
extern u_int16_t htons __P ((u_int16_t __hostshort));

I don't want to modify include files, so if anyone has some suggestions ...

Cheers,
Davide.

--
"Debian, the Freedom in Freedom."



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:52    [W:0.111 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site