Patchwork sheepdog: fix compile error on systems without TCP_CORK

login
register
mail settings
Submitter MORITA Kazutaka
Date July 7, 2010, 6:25 a.m.
Message ID <1278483930-16479-1-git-send-email-morita.kazutaka@lab.ntt.co.jp>
Download mbox | patch
Permalink /patch/58080/
State New
Headers show

Comments

MORITA Kazutaka - July 7, 2010, 6:25 a.m.
WIN32 is not only the system which doesn't have TCP_CORK (e.g. OS X).

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
---

Betts, I think this patch fix the compile error.  Can you try this
one?

 block/sheepdog.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
C.W. Betts - July 7, 2010, 4:32 p.m.
It compiles now.
On Jul 7, 2010, at 12:25 AM, MORITA Kazutaka wrote:

> WIN32 is not only the system which doesn't have TCP_CORK (e.g. OS X).
> 
> Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
> ---
> 
> Betts, I think this patch fix the compile error.  Can you try this
> one?
> 
> block/sheepdog.c |    2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/block/sheepdog.c b/block/sheepdog.c
> index 69a2494..81aa564 100644
> --- a/block/sheepdog.c
> +++ b/block/sheepdog.c
> @@ -889,7 +889,7 @@ static int aio_flush_request(void *opaque)
>     return !QLIST_EMPTY(&s->outstanding_aio_head);
> }
> 
> -#ifdef _WIN32
> +#if !defined(SOL_TCP) || !defined(TCP_CORK)
> 
> static int set_cork(int fd, int v)
> {
> -- 
> 1.5.6.5
> 
> 
>
Blue Swirl - July 7, 2010, 7:42 p.m.
Thanks, applied. It also fixes OpenBSD build.

On Wed, Jul 7, 2010 at 6:25 AM, MORITA Kazutaka
<morita.kazutaka@lab.ntt.co.jp> wrote:
> WIN32 is not only the system which doesn't have TCP_CORK (e.g. OS X).
>
> Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
> ---
>
> Betts, I think this patch fix the compile error.  Can you try this
> one?
>
>  block/sheepdog.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/block/sheepdog.c b/block/sheepdog.c
> index 69a2494..81aa564 100644
> --- a/block/sheepdog.c
> +++ b/block/sheepdog.c
> @@ -889,7 +889,7 @@ static int aio_flush_request(void *opaque)
>     return !QLIST_EMPTY(&s->outstanding_aio_head);
>  }
>
> -#ifdef _WIN32
> +#if !defined(SOL_TCP) || !defined(TCP_CORK)
>
>  static int set_cork(int fd, int v)
>  {
> --
> 1.5.6.5
>
>
>

Patch

diff --git a/block/sheepdog.c b/block/sheepdog.c
index 69a2494..81aa564 100644
--- a/block/sheepdog.c
+++ b/block/sheepdog.c
@@ -889,7 +889,7 @@  static int aio_flush_request(void *opaque)
     return !QLIST_EMPTY(&s->outstanding_aio_head);
 }
 
-#ifdef _WIN32
+#if !defined(SOL_TCP) || !defined(TCP_CORK)
 
 static int set_cork(int fd, int v)
 {