Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* SAINT on Alpha
@ 1999-02-03 10:07 Designer 7
  1999-02-03 17:27 ` Michal Jaegermann
  0 siblings, 1 reply; 2+ messages in thread
From: Designer 7 @ 1999-02-03 10:07 UTC (permalink / raw)
  To: axp-list

Has anyone gotten SAINT to compile on Alpha?

I'm getting compile errors I don't understand at all...

the error is along the line of:
xxx:no member named ip_hl in structure

the basic structure of the code is something like:

#include <netinet/ip.h>

function(sock)
{
	int hdrlen;
	struct ip* ip;

stuff...


	hdrlen = ip->ip_hl << 2;	<<<<--- this is line xxx above


stuff...
}


I tried removing the struct in front of the ip... but that gave more 
problems.. and odd one too.. something about unreachable code...

I also tried using a different variable name instead of ip... thinking 
it was confusing the compiler.. but exact same error... as above...

I looked in <netinet/ip.h> and I know ip_hl is there.... I just don't 
know why the compiler complains that there is no such member...

Any suggestions..??? 

TIA,
D.

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: SAINT on Alpha
  1999-02-03 10:07 SAINT on Alpha Designer 7
@ 1999-02-03 17:27 ` Michal Jaegermann
  0 siblings, 0 replies; 2+ messages in thread
From: Michal Jaegermann @ 1999-02-03 17:27 UTC (permalink / raw)
  To: axp-list

Designer 7 wrote:
> 
> 
> I'm getting compile errors I don't understand at all...
> 
> the error is along the line of:
> xxx:no member named ip_hl in structure

It is a bit field - by looking at ip.h header but __BYTE_ORDER
has to be equal to one of two things before you will get it.
This should come from some other headers.

> the basic structure of the code is something like:

In situations like that, when you are not sure what compiler is
really getting, try to add '-E' to compilations flags you use,
capture output and check it (collapsing all these blank lines
by filtering it through something like "awk 'NF>0'" often helps
in readability :-).  Sometimes things are different than they
look like at the first blush.

The above assumes, of course, that your compiler was not wailing
about redefinitions and the like - what you blissfully ignored.

> #include <netinet/ip.h>
......
> I tried removing the struct in front of the ip... but that gave more 
> problems..

It would be extremely surprising if it did not. :-)

  Michal


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1999-02-03 20:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-02-03 10:07 SAINT on Alpha Designer 7
1999-02-03 17:27 ` Michal Jaegermann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox