Changeset 96ee6f


Ignore:
Timestamp:
06/11/09 18:53:56 (3 years ago)
Author:
Erik Ekman <yarrick@…>
Branches:
master
Children:
7196e9
Parents:
e51af1
git-author:
Erik Ekman <yarrick@…> (06/11/09 18:53:56)
git-committer:
Erik Ekman <erik@…> (02/04/12 20:34:01)
Message:

Use recv on windows and read for the others

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/tun.c

    r8b95bd r96ee6f  
    362362        int bytes; 
    363363        memset(buf, 0, 4); 
     364#ifdef WINDOWS32 
     365        /* Windows needs recv() since it is local UDP socket */ 
     366        bytes = recv(tun_fd, buf + 4, len - 4, 0); 
     367#else 
     368        /* The other need read() because fd is not a socket */ 
    364369        bytes = read(tun_fd, buf + 4, len - 4); 
     370#endif /*WINDOWS32*/ 
    365371        if (bytes < 0) { 
    366372                return bytes; 
Note: See TracChangeset for help on using the changeset viewer.