On Tue, Oct 22, 2013 at 03:34:20PM +0200, Gisle Vanem wrote:
> Patch docs/examples/httpput.c for MSVC since it's missing <unistd.h>:
> 
> --- Git-latest/docs/examples/httpput.c 2013-01-28 15:48:38 +0000
> +++ docs/examples/httpput.c    2013-10-09 11:54:26 +0000
> @@ -22,7 +22,9 @@
> #include <stdio.h>
> #include <fcntl.h>
> #include <sys/stat.h>
> -#include <unistd.h>
> +#ifndef _MSC_VER
> +#  include <unistd.h>
> +#endif
> 
> #include <curl/curl.h>
> 
> ----------------
> 
> But I'm not sure <unistd.h> is needed at all.

It's needed for close(2). But the only reason that's needed is because fstat
is used instead of stat(2); if you fix that, then you could remove that
include altogether.

>>> Dan
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Reply via email to