#include <fcntl.h>
#include <unistd.h>

int fcntl(int fd, int cmd, ... /* arg */ );

/* 样例 */
int flags = fcntl(fd, F_GETFL);
flags |= O_NONBLOACK;
fcntl(fd, F_SETFL, flags);