ext/fileinfo/libmagic/apprentice.c", line 2195: error: syntax error before or at: struct
| From: | Dennis Clarke | Date: | Tue, 04 Oct 2016 01:17:44 +0000 |
| Subject: | ext/fileinfo/libmagic/apprentice.c", line 2195: error: syntax error before or at: struct | ||
| Groups: | php.install | ||
| Request: | Send a blank email to php-install+get-20484@lists.php.net to get a copy of this message | ||
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