This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: linux/*.h include files


thanks steve!

But i still getting an error :(

Looks like its not completelly implements the linux/if_ether.h and linux/in.h :)


the error message i got:


$ gcc -o sniffer sniffer.c
sniffer.c: In function `main':
sniffer.c:14: error: `PF_PACKET' undeclared (first use in this function)
sniffer.c:14: error: (Each undeclared identifier is reported only once
sniffer.c:14: error: for each function it appears in.)
sniffer.c:15: error: `ETH_P_IP' undeclared (first use in this function)



do you have any suggestion?


At 14:55 17/10/2003, you wrote:
Flavio Rabello de Souza wrote:


I´m trying to compile a C program under cygwin but it uses some linux include files. (#include <linux/in.h> and #include <linux/if_ether.h>)

On my cygwin system I have both <netinet/in.h> and <net/if.h> . These are the 'standard' includes that they probably should have used if they wanted their code to be portable. Try them and see if that helps. These standard include files will usually in turn include the 'platform specific' header files for that system. It is best to never use the 'platform specific' version (e.g. linux/*.h, cygwin/*.h ) directly unless it is in code which would never compile and run on any other system.


Steve.






Atenciosamente, (Sincerelly,)


Flavio Rabello

fone: 55-27-3348-4096
fax:  55-27-3348-4289

Frase do dia:
Microsoft products work great ... until you install them !


Public PGP key at server pgpkeys.mit.edu port 11371



-- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]