VNC on amd64: SIOCGIFCONF problems

David C. Myers myers at aedifice.net
Mon Feb 28 05:13:26 GMT 2005



VNC-3.3.7 in ports looks like it doesn't work because of 64-bit 
alignment issues with SIOCGIFCONF.  The offending code is in 
Xvnc/programs/Xserver/os/access.c:

    if (ifioctl (fd, (int) SIOCGIFCONF, (pointer) &ifc) < 0)
        Error ("Getting interface configuration (4)");

which comes out in the trace file as:

 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
       "


(Actually, the very first error you'll  get is a "Could not open default 
font 'fixed'" message, but you can make that go away by running a font 
server and passing its address to Xvnc...)

Is there a quick solution to this?  A 32-bit compatibility shim?  
Judging from Google, issues with this ioctl go back years, on all kinds 
of platforms.  getifaddrs() is the right way to do this on BSD?

-David.






More information about the freebsd-amd64 mailing list