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)
committerKarolin Seeger <kseeger@samba.org>
Wed, 15 Apr 2009 07:07:44 +0000 (09:07 +0200)
This fixes a "defined but not used" compile warning.
(cherry picked from commit 1aa65f485b60a80766581e7d3f31565f340aa528)

source3/smbd/reply.c

index 1ee4708dcef1c2171e232ffeab2ae340758abb32..5cdc59bf9284d030557fce63cac076929e83a7a4 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).