Comment réinitialiser un socket en mode blocage (après l'avoir réglé en mode non bloquant)?

J'ai lu ce qui concerne la fixation d'un socket non bloquant mode.

http://www.gnu.org/software/libc/manual/html_mono/libc.html#File-Status-Flags

Voici ce que j'ai fait:

static void setnonblocking(int sock)
{
    int opts;

    opts = fcntl(sock,F_GETFL);
    if (opts < 0) {
        perror("fcntl(F_GETFL)");
        exit(EXIT_FAILURE);
    }
    opts = (opts | O_NONBLOCK);
    if (fcntl(sock,F_SETFL,opts) < 0) {
        perror("fcntl(F_SETFL)");
        exit(EXIT_FAILURE);
    }
    return;
}

Comment puis-je définir le support arrière à Blocage de mode? Je ne vois pas O_BLOCK drapeau?

Merci.

source d'informationauteur n179911