#if (__FreeBSD_version > 500000)
299 if (port_access_handle
300 || (port_access_handle = fopen("/dev/io", "rw")) != NULL) {
301 return i386_set_ioperm(port, 1, 1);
302 }
303 else {
304 return (-1); /* Failure */
305 };
306 #else
307 return i386_set_ioperm(port, 1, 1);
308 #endif
from the link you attached seems what i suggested is about right, use /dev/io