[prev in list] [next in list] [prev in thread] [next in thread] 

List:       php-install
Subject:    [PHP-INSTALL] ext/fileinfo/libmagic/apprentice.c", line 2195: error: syntax error before or at: stru
From:       Dennis Clarke <dclarke () blastwave ! org>
Date:       2016-10-04 1:17:44
Message-ID: e91e7b82-fee7-b606-26f4-d0192eee6967 () blastwave ! org
[Download RAW message or body]

While attempting a build of 7.0.11 I was presented with :

"/usr/local/build/php-7.0.11_SunOS5.10_sparcv9.001/ext/fileinfo/libmagic/apprentice.c", 
line 2195: error: syntax error before or at: struct
"/usr/local/build/php-7.0.11_SunOS5.10_sparcv9.001/ext/fileinfo/libmagic/apprentice.c", 
line 2209: error: syntax error before or at: struct
cc: acomp failed for 
/usr/local/build/php-7.0.11_SunOS5.10_sparcv9.001/ext/fileinfo/libmagic/apprentice.c
gmake: *** [ext/fileinfo/libmagic/apprentice.lo] Error 1


The problem appears to be in a strange placement of the keyword "struct" :

   2189  private int
   2190  parse_apple(struct magic_set *ms, struct magic_entry *me, const 
char *line)
   2191  {
   2192          struct magic *m = &me->mp[0];
   2193
   2194          return parse_extra(ms, me, line,
   2195              CAST(off_t, offsetof(struct magic, apple)),
   2196              sizeof(m->apple), "APPLE", "!+-./", 0);
   2197  }
   2198

also

   2203  private int
   2204  parse_mime(struct magic_set *ms, struct magic_entry *me, const 
char *line)
   2205  {
   2206          struct magic *m = &me->mp[0];
   2207
   2208          return parse_extra(ms, me, line,
   2209              CAST(zend_off_t, offsetof(struct magic, mimetype)),
   2210              sizeof(m->mimetype), "MIME", "+-/.", 1);
   2211  }
   2212


Not sure where the definition of "offsetof()" is located but something 
seems clearly not C compliant here.

Dennis
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic