#include <stdio.h>
#include <stdbool.h>
+#include <string.h>
int main(int argc, char** argv){
+ if(argv[1] != NULL && strcmp(argv[1], "--version") == 0){
+ printf("LibW3 %s\n", LIBW3_VERSION);
+ return 0;
+ }
if(argc < 3){
fprintf(stderr, "Usage: %s URL Path\n", argv[0]);
return 1;
sock = socket(rp->ai_family, rp->ai_socktype, rp->ai_protocol);
if(sock == -1) continue;
int nzero = 0;
- setsockopt(sock, SOL_SOCKET, SO_SNDBUF, &nzero, sizeof(nzero));
+ setsockopt(sock, SOL_SOCKET, SO_SNDBUF, (char*)&nzero, sizeof(nzero));
if(connect(sock, rp->ai_addr, rp->ai_addrlen) != -1) break;
close(sock);
}