#include <arpa/inet.h>  // for socket(), AF_INT, SOCK_STREAM
#include <stdlib.h>     // for EXIT_SUCCESS, EXIT_FAILURE
#include <string.h>     // for strerror()
#include <unistd.h>     // for close()
#include <iostream>     // for std::cerr, std::endl

int main(int argc, char **argv) {
  int socket_fd = socket(AF_INET, SOCK_STREAM, 0);
  if (socket_fd == -1) {
     std::cerr << strerror(errno) << std::endl;
     return EXIT_FAILURE;
  }
  close(socket_fd);
  return EXIT_SUCCESS;
}