Patch from Eric Norum <eric@…> that adds external fcntl support and an external fcntl handler for sockets.