~ubuntu-branches/ubuntu/saucy/curl/saucy-201307251546

« back to all changes in this revision

Viewing changes to lib/nonblock.c

  • Committer: Package Import Robot
  • Author(s): Alessandro Ghedini
  • Date: 2012-03-23 16:24:51 UTC
  • mto: (3.6.1 experimental) (1.3.1)
  • mto: This revision was merged to the branch mainline in revision 59.
  • Revision ID: package-import@ubuntu.com-20120323162451-z4gstlabjkgnrh7h
Tags: upstream-7.25.0
ImportĀ upstreamĀ versionĀ 7.25.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
 *                            | (__| |_| |  _ <| |___
6
6
 *                             \___|\___/|_| \_\_____|
7
7
 *
8
 
 * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
 
8
 * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
9
9
 *
10
10
 * This software is licensed as described in the file COPYING, which
11
11
 * you should have received as part of this distribution. The terms
61
61
 
62
62
  /* most recent unix versions */
63
63
  int flags;
64
 
  flags = fcntl(sockfd, F_GETFL, 0);
 
64
  flags = sfcntl(sockfd, F_GETFL, 0);
65
65
  if(nonblock)
66
 
    return fcntl(sockfd, F_SETFL, flags | O_NONBLOCK);
 
66
    return sfcntl(sockfd, F_SETFL, flags | O_NONBLOCK);
67
67
  else
68
 
    return fcntl(sockfd, F_SETFL, flags & (~O_NONBLOCK));
 
68
    return sfcntl(sockfd, F_SETFL, flags & (~O_NONBLOCK));
69
69
 
70
70
#elif defined(HAVE_IOCTL_FIONBIO)
71
71