Subject: Re: Another gcc problem...
To: Torsten Harenberg <harenberg@physik.uni-wuppertal.de>
From: Martin Husemann <martin@duskware.de>
List: port-alpha
Date: 12/13/2003 21:45:26
On Sat, Dec 13, 2003 at 05:01:25PM +0100, Torsten Harenberg wrote:
> on my way compiling kde-3.1.4 on alpha, I face the next problem. Hope we
> have a gcc guru here....

That's not gcc related at all:

> ksimcpu.cpp:290: error: cannot convert `unsigned int*' to `size_t*' for
>    argument `4' to `int sysctl(int*, unsigned int, void*, size_t*, const
> void*, long unsigned int)'

Because size_t != int you should never pass the address of an int variable as
"size_t *oldlenp" to sysctl(3).

You get away with this on some platforms where size_t == int, but all LP64
plattforms sure will lose.

The kde code needs to be fixed by changing the type of that variable to size_t.

Martin