--- libaitio/example/recvfile.c 2011/12/13 02:23:07 1.2 +++ libaitio/example/recvfile.c 2013/06/26 22:48:53 1.3 @@ -1,7 +1,9 @@ #include +#include #include #include #include +#include #include @@ -37,8 +39,9 @@ main(int argc, char **argv) return 4; } - if ((c = accept(s, &sa, &sl)) != -1) { - sl = ioRecvFile(c, argv[1], strtol(argv[2], NULL, 0), 0644, argv[3] ? strtol(argv[3], NULL, 0) : 0); + if ((c = accept(s, &sa, (socklen_t*) &sl)) != -1) { + sl = ioRecvFile(c, argv[1], strtol(argv[2], NULL, 0), 0644, + argv[3] ? strtol(argv[3], NULL, 0) : 0); printf("received %d bytes\n", sl); if (!sl) printf("#%d - %s\n", io_GetErrno(), io_GetError());