r19769: more compile fixes while merging from SAMBA_3_0 (not done yet)