$OpenBSD: patch-lib_sshv2_c,v 1.2 2007/11/06 12:14:18 ajacoutot Exp $ --- lib/sshv2.c.orig Tue Jan 4 14:32:11 2005 +++ lib/sshv2.c Tue Nov 6 13:05:08 2007 @@ -1867,31 +1867,13 @@ sshv2_put_file (gftp_request * request, const char *fi } -#ifdef G_HAVE_GINT64 - -static gint64 -sshv2_hton64 (gint64 val) -{ -#if G_BYTE_ORDER != G_BIG_ENDIAN - return (GINT64_TO_BE (val)); -#else - return (val); -#endif -} - -#endif - - static void sshv2_setup_file_offset (sshv2_params * params, char *buf) { guint32 hinum, lownum; #ifdef G_HAVE_GINT64 - gint64 offset; - - offset = sshv2_hton64 (params->offset); - lownum = offset >> 32; - hinum = (guint32) offset; + lownum = htonl((guint32) params->offset); + hinum = htonl(params->offset >> 32); #else hinum = 0; lownum = htonl (params->offset);