Changeset 1396

Show
Ignore:
Timestamp:
11/09/2006 03:58:16 AM (22 months ago)
Author:
jan
Message:

added compile fix if libaio + headers are not installed on linux

Location:
trunk/src
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/network.c

    r1394 r1396  
    477477#if defined USE_LINUX_SENDFILE 
    478478                { NETWORK_BACKEND_LINUX_SENDFILE,       "linux-sendfile" }, 
     479#endif 
     480#if defined USE_LINUX_AIO_SENDFILE 
    479481                { NETWORK_BACKEND_LINUX_AIO_SENDFILE,   "linux-aio-sendfile" }, 
    480482#endif 
     
    574576                SET_NETWORK_BACKEND(read, linuxsendfile); 
    575577                break; 
     578#endif 
     579#ifdef USE_LINUX_AIO_SENDFILE 
    576580        case NETWORK_BACKEND_LINUX_AIO_SENDFILE: 
    577581                SET_NETWORK_BACKEND(read, linuxaiosendfile); 
  • trunk/src/network_backends.h

    r1394 r1396  
    1313# include <sys/sendfile.h> 
    1414# include <sys/uio.h> 
     15# if defined HAVE_LIBAIO_H 
     16#  define USE_LINUX_AIO_SENDFILE 
     17# endif 
    1518#endif 
    1619 
  • trunk/src/network_linux_aio.c

    r1394 r1396  
    33#include "network_backends.h" 
    44 
    5 #ifdef USE_LINUX_SENDFILE 
     5#ifdef USE_LINUX_AIO_SENDFILE 
    66#include <sys/types.h> 
    77#include <sys/socket.h> 
     
    8686                        do { 
    8787                                size_t toSend; 
    88                                 const size_t max_toSend = 2 * 256 * 1024; /** should be larger than the send buffer */ 
     88                                const size_t max_toSend = 4 * 256 * 1024; /** should be larger than the send buffer */ 
    8989 
    9090                                toSend = c->file.length - c->offset > max_toSend ?