Date: Mon, 28 Feb 2005 17:41:11 -0800 From: Brooks Davis <brooks@one-eyed-alien.net> To: "David C. Myers" <myers@aedifice.net> Cc: freebsd-amd64@freebsd.org Subject: Re: VNC on amd64: SIOCGIFCONF problems Message-ID: <20050301014111.GA6907@odin.ac.hmc.edu> In-Reply-To: <4222A870.2090500@aedifice.net> References: <4222A870.2090500@aedifice.net>
next in thread | previous in thread | raw e-mail | index | archive | help
--C7zPtVaVf+AK4Oqc Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Feb 27, 2005 at 09:13:20PM -0800, David C. Myers wrote: >=20 >=20 > VNC-3.3.7 in ports looks like it doesn't work because of 64-bit=20 > alignment issues with SIOCGIFCONF. The offending code is in=20 > Xvnc/programs/Xserver/os/access.c: >=20 > if (ifioctl (fd, (int) SIOCGIFCONF, (pointer) &ifc) < 0) > Error ("Getting interface configuration (4)"); >=20 > which comes out in the trace file as: >=20 > 28138 Xvnc CALL bind(0x1,0x7fffffffe670,0x13) > 28138 Xvnc NAMI "/tmp/.X11-unix/X1" > 28138 Xvnc RET bind 0 > 28138 Xvnc CALL listen(0x1,0x80) > 28138 Xvnc RET listen 0 > 28138 Xvnc CALL umask(0x12) > 28138 Xvnc RET umask 0 > 28138 Xvnc CALL ioctl(0,0xffffffffc0106924 ,0x7fffffffe030) > 28138 Xvnc RET ioctl -1 errno 6 Device not configured > 28138 Xvnc CALL writev(0x2,0x7fffffffd790,0x4) > 28138 Xvnc GIO fd 2 wrote 59 bytes > "Getting interface configuration (4): Device not configured > " >=20 >=20 > (Actually, the very first error you'll get is a "Could not open default= =20 > font 'fixed'" message, but you can make that go away by running a font=20 > server and passing its address to Xvnc...) >=20 > Is there a quick solution to this? A 32-bit compatibility shim? =20 > Judging from Google, issues with this ioctl go back years, on all kinds= =20 > of platforms. getifaddrs() is the right way to do this on BSD? You need to copy the misaligned element(s) into properly aligned temporary storage or use getifaddrs instead. SIOCGIFCONF is a really crappy inteface. -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --C7zPtVaVf+AK4Oqc Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFCI8g3XY6L6fI4GtQRAg70AJ0bjutnUGvavO9rLhs4XMKgNO8xFQCeO+5w OFqDt7hAzGAR0rtn3aJILro= =xElg -----END PGP SIGNATURE----- --C7zPtVaVf+AK4Oqc--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050301014111.GA6907>