Skip to content

Commit

Permalink
Fix compile: #elif FOO is not the same as #elif defined(FOO).
Browse files Browse the repository at this point in the history
git-svn-id: http://levent.svn.sourceforge.net/svnroot/levent/trunk/libevent@1245 ce677c24-8c1a-0410-9497-a30ef3a96221
  • Loading branch information
nickm committed Apr 28, 2009
1 parent 30e3421 commit d5c1c07
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions buffer.c
Expand Up @@ -1695,19 +1695,19 @@ evbuffer_write_sendfile(struct evbuffer *buffer, evutil_socket_t fd,

ASSERT_EVBUFFER_LOCKED(buffer);

#ifdef SENDFILE_IS_MACOSX
#if defined(SENDFILE_IS_MACOSX)
res = sendfile(info->fd, fd, chain->misalign, &len, NULL, 0);
if (res == -1 && !EVUTIL_ERR_RW_RETRIABLE(errno))
return (-1);

return (len);
#elif SENDFILE_IS_FREEBSD
#elif defined(SENDFILE_IS_FREEBSD)
res = sendfile(info->fd, fd, chain->misalign, len, NULL, &len, 0);
if (res == -1 && !EVUTIL_ERR_RW_RETRIABLE(errno))
return (-1);

return (len);
#elif SENDFILE_IS_LINUX
#elif defined(SENDFILE_IS_LINUX)
/* TODO(niels): implement splice */
res = sendfile(fd, info->fd, &offset, chain->off);
if (res == -1 && EVUTIL_ERR_RW_RETRIABLE(errno)) {
Expand Down

0 comments on commit d5c1c07

Please sign in to comment.