extern (C) int fcntl(int, int, int);
C keeps the constants under lock and key of course, so you have to specify them manually. But you could write a C program to print them out, or generate D code I suppose.
const int F_SETFL = 4 const int F_GETFL = 3 const int O_NONBLOCK = 2048 fcntl(fd,F_SETFL,O_NONBLOCK | fcntl(fd,F_GETFL,42)); not tested or anything.