title: c project compile error
body: <p>ok,all my file like this</p>
  
  <p>sendmail.h has some fucntion declared and some constant in this file</p>
  
  <pre><code>#define STMP_SERVER "smtp.exmail.qq.com"
  #define LOGIN_NAME "secbot@test.com"
  #define LOGIN_PASSOWRD "123456"
  #define MAIL_TO "root@test.com"
  
  
  char* get_local_addr(char* buf, size_t len);
  
  int base64_encode(unsigned char *buf, int nLen, char *pOutBuf, int nBufSize);
  
  void sendemail(char *smtpServer, char *serveruser, char *serverpassword, char *serverip);
  
  int open_socket(struct sockaddr *addr);
  </code></pre>
  
  <p>sendmail.c has some function like sendmail.h function</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;string.h&gt;
  #include &lt;sys/types.h&gt;
  #include &lt;sys/socket.h&gt;
  #include &lt;netinet/in.h&gt;
  #include &lt;errno.h&gt;
  #include &lt;unistd.h&gt;
  #include &lt;sys/time.h&gt;
  #include &lt;netdb.h&gt;
  #include &lt;arpa/inet.h&gt;
  #include &lt;fcntl.h&gt;
  #include &lt;stddef.h&gt;
  
  ..............
  </code></pre>
  
  <p>test.c is main function</p>
  
  <pre><code>#include "sendmail.h"
  
  
  #define SERVERNAME "root"
  #define SERVERPASSWORD "123456"
  
  
  int main()
  {   
      sendemail(STMP_SERVER, SERVERNAME, SERVERPASSWORD,NULL);
      return 0;
  }
  </code></pre>
  
  <p>but compile error and say this</p>
  
  <pre><code>[root@ops test]# gcc -o test test.c 
  In file included from test.c:1:
  sendmail.h:10: error: expected declaration specifiers or ‘...’ before ‘size_t’
  sendmail.h:16: warning: ‘struct sockaddr’ declared inside parameter list
  sendmail.h:16: warning: its scope is only this definition or declaration, which is probably not what you want
  test.c: In function ‘main’:
  test.c:10: error: ‘NULL’ undeclared (first use in this function)
  test.c:10: error: (Each undeclared identifier is reported only once
  test.c:10: error: for each function it appears in.)
  </code></pre>