s3: ifdef sendfile code that's only used in other ifdef'ed sendfile code
authorBjörn Jacke <bj@sernet.de>
Fri, 27 Mar 2009 09:24:18 +0000 (10:24 +0100)
committerVolker Lendecke <vl@samba.org>
Fri, 27 Mar 2009 12:41:35 +0000 (13:41 +0100)
This fixes a "defined but not used" compile warning.

source3/smbd/reply.c

index 16eb4a7fd7cbd27acdc80a868aaf181bec6594fc..3f9d5c5498fd94361f7c3e15dc64267251cd9394 100644 (file)
@@ -2679,6 +2679,7 @@ static ssize_t fake_sendfile(files_struct *fsp, SMB_OFF_T startpos,
        return (ssize_t)nread;
 }
 
+#if defined(WITH_SENDFILE)
 /****************************************************************************
  Deal with the case of sendfile reading less bytes from the file than
  requested. Fill with zeros (all we can do).
@@ -2735,6 +2736,7 @@ static void sendfile_short_send(files_struct *fsp,
                SAFE_FREE(buf);
        }
 }
+#endif /* defined WITH_SENDFILE */
 
 /****************************************************************************
  Return a readbraw error (4 bytes of zero).