title: Why doesn't struct declaration compile in Android NDK?
body: <p>How can a struct be compiled with Android NDK?</p>
  
  <p>The following declaration (works fine with g++) </p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;sys/socket.h&gt;
  #include &lt;netdb.h&gt;
  #include &lt;cstring&gt;
  #include &lt;fstream&gt;
  #include &lt;sstream&gt;
  
  //header construction here...
      private:
        struct sockaddr_in serv_addr;
  </code></pre>
  
  <p>gives the error:</p>
  
  <pre><code>error: field 'serv_addr' has incomplete type
  struct sockaddr_in serv_addr;
                     ^
  </code></pre>