title: invalid conversion from int to socklen
body: <p>Below is my code for Linux.
  I am implementing a client/server application and below is the server .cpp file.</p>
  
  <pre><code>int main()
  {
   int serverFd, clientFd, serverLen, clientLen;
  struct sockaddr_un serverAddress;/* Server address */
  struct sockaddr_un clientAddress; /* Client address */
  struct sockaddr* serverSockAddrPtr; /* Ptr to server address */
  struct sockaddr* clientSockAddrPtr; /* Ptr to client address */
  
  /* Ignore death-of-child signals to prevent zombies */
  signal (SIGCHLD, SIG_IGN);
  
  serverSockAddrPtr = (struct sockaddr*) &amp;serverAddress;
  serverLen = sizeof (serverAddress);
  
  clientSockAddrPtr = (struct sockaddr*) &amp;clientAddress;
  clientLen = sizeof (clientAddress);
  
  /* Create a socket, bidirectional, default protocol */
  serverFd = socket (AF_LOCAL, SOCK_STREAM, DEFAULT_PROTOCOL);
  serverAddress.sun_family = AF_LOCAL; /* Set domain type */
  strcpy (serverAddress.sun_path, "css"); /* Set name */
  unlink ("css"); /* Remove file if it already exists */
  bind (serverFd, serverSockAddrPtr, serverLen); /* Create file */
  listen (serverFd, 5); /* Maximum pending connection length */   
  
  readData();
  
  while (1) /* Loop forever */
    {
      /* Accept a client connection */
      clientFd = accept (serverFd, clientSockAddrPtr, &amp;clientLen);
  
      if (fork () == 0) /* Create child to send recipe */
        {
          printf ("");
      printf ("\nRunner server program. . .\n\n");
      printf ("Country Directory Server Started!\n");
  
          close (clientFd); /* Close the socket */
          exit (/* EXIT_SUCCESS */ 0); /* Terminate */
        }
      else
        close (clientFd); /* Close the client descriptor */
    }
  </code></pre>
  
  <p>}    </p>
  
  <p>When i tried to compile it displays an error message which shows.</p>
  
  <pre><code> server.cpp:237:67: error: invalid conversion from ‘int*’ to ‘socklen_t*’
  server.cpp:237:67: error:   initializing argument 3 of ‘int accept(int, sockaddr*, socklen_t*)’
  </code></pre>
  
  <p>It points to this line</p>
  
  <pre><code>clientFd = accept (serverFd, clientSockAddrPtr, &amp;clientLen);
  </code></pre>
  
  <p>I do not actually know how to solve this problem.
  Thanks in advance to those who helped! :)</p>