Re: Bug#82737: building mysql-3.23.30 packages from source fails
On Sun 21 Jan 2001, Cristian Ionescu-Idbohrn wrote:
> downloaded 3.23.31. Builds just fine on i386, but sadly, fails on alpha
> (potato, Linux 2.2.13, gcc version 2.95.2 20000220).
> ha_berkeley.cc:250: passing `void * (*)(unsigned int)'
> as argument 4 of
> `log_archive(DB_ENV *, char ***, unsigned int, void * (*)(long
> unsigned int))'
Typical, people assuming that sizeof(long) == sizeof(int).
On alpha: 8 != 4 ...
Adding a cast for arg 4 should help.
Oh wait, I see now that there *is* a cast, and it's an explicit
cast to <mumble>unsigned int, whereas the prototype for the function
declares <mumble>size_t. Hence changing the "unsigned int" to "size_t"
in ha_berkeley.cc (at two places) should fix it.
What are some people thinking when they add casts... I've seen many
cases where simply removing the damn cast does the right thing in all
cases, I wouldn't be surprised if that's the case here too.
Anyway, with the fix above it compiles fine; uploading now.
home: firstname.lastname@example.org http://www.wurtel.demon.nl/
work: email@example.com http://www.murphy.nl/
debian: firstname.lastname@example.org http://www.debian.org/
isdn4linux: email@example.com http://www.isdn4linux.org/