joyent/libuv — pull request #1115 by starwing (2014-02-15 06:07:12+00:00)
Title: makefile: fix build failure on MinGW

libuv build fail with MinGW on windows:

```
SW@SW-PC /d/Work/Code/libuv (master)
$ make -f Makefile.mingw
g++ -c -o src/fs-poll.o src/fs-poll.c
src/fs-poll.c: In function 'int uv_fs_poll_start(uv_fs_poll_t*, uv_fs_poll_cb, c
onst char*, unsigned int)':
src/fs-poll.c:69:37: error: invalid conversion from 'void*' to 'poll_ctx*' [-fpe
rmissive]
ctx = calloc(1, sizeof(*ctx) + len);
^
src/fs-poll.c: In function 'int uv_fs_poll_stop(uv_fs_poll_t*)':
src/fs-poll.c:103:7: error: invalid conversion from 'void*' to 'poll_ctx*' [-fpe
rmissive]
ctx = handle->poll_ctx;
^
: recipe for target 'src/fs-poll.o' failed
make: *** [src/fs-poll.o] Error 1
```

changed the build line, allow user to add CFLAGS (use EXTRA_CFLAGS in makefile for libuv itself), and add a clean target.