title: Typedef an externel structure in file using cross-compiler (arm-none-eabi-gcc)
body: <p>I'm trying to compile a project which consist of severel source fies &amp; header files &amp; includes some structure definiton. But when I compile an error comes </p>
  
  <p>"error: expected specifier-qualifier-list before 'typedef'" in file "uip.h"</p>
  
  <p>I have a structure in file named as "httpd.h"</p>
  
  <pre><code>    struct httpd_state {
      unsigned char timer;
      struct psock sin, sout;
      struct pt outputpt, scriptpt;
      char inputbuf[50];
      char filename[20];
      char state;
      struct httpd_fsdata_file_noconst *file;
      int len;
      char *scriptptr;
      int scriptlen;
      unsigned short count;
      };
  </code></pre>
  
  <p>I want to typedef this structure in another file named as "uip.h"</p>
  
  <pre><code>    struct uip_conn {
      uip_ipaddr_t ripaddr;   /**&lt; The IP address of the remote host. */
      u16_t lport;        /**&lt; The local TCP port, in network byte order. */
      u16_t rport;        /**&lt; The local remote TCP port, in network order. */
      u8_t rcv_nxt[4];    /**&lt; The sequence number that we expect toreceive next. */
      u8_t snd_nxt[4];    /**&lt; The sequence number that was last sent by us. */
      u16_t len;          /**&lt; Length of the data that was previously sent. */
      u16_t mss;          /**&lt; Current maximum segment size for the connection. */
      u16_t initialmss;   /**&lt; Initial maximum segment size for the connection. */
      u8_t sa;            /**&lt; Retransmission time-out calculation state variable. */
      u8_t sv;            /**&lt; Retransmission time-out calculation state variable. */
      u8_t rto;           /**&lt; Retransmission time-out. */
      u8_t tcpstateflags; /**&lt; TCP state and flags. */
      u8_t timer;         /**&lt; The retransmission timer. */
      u8_t nrtx;          /**&lt; The number of retransmissions for the last segment sent*/
    /** The application state. */
     **typedef struct httpd_state uip_tcp_appstate_t;
     uip_tcp_appstate_t appstate;**
     } __attribute__((packed));
  </code></pre>
  
  <p>Can anyone please help??</p>