Try typecasting the first parameter, as in
off_t headdrop = min(off_t(curpos - totwritten), off_t(totwritten * 2));
Klaus
I think the compiler is not the problem (same version). Trying the next option.
gcc (SUSE Linux) 4.3.1 20080507 (prerelease) [gcc-4_3-branch revision 135036] Copyright (C) 2008 Free Software Foundation, Inc.
I had same problem with gcc 4.3.2 on Mandriva. (x86_64 env) Adding off_t() typecasting for the first parameter as you suggested fixed it. Klaus do you remember to fix it for next version without patch?
Mika