Hola a todos.
No sé si este tema va aquí, si no, me pueden ayudar a moverlo a la sección que pertenesca por fa.
Estoy tratando de instalar el profiler xhprof para php pero al momento de hacer "make" me manda el siguiente error:
Cita: /home/lair/Descargas/PHP/xhprof/extension/xhprof.c:2025:19: error: ‘zval {también conocido como struct _zval_struct}’ no tiene un miembro llamado ‘type’
} else if(values->type == IS_STRING) {
Lo que no entiendo es por qué, ya que revisando el archivo contiene en una validación anterior esa misma lectura a la propiedad type, les paso un fragmento del archivo.
Código C:
Ver originalstatic char **hp_strings_in_zval(zval *values) {
char **result;
size_t count;
size_t ix = 0;
if (!values) {
return NULL;
}
if (values->type == IS_ARRAY) { //EN ESTA LÍNEA SE HACE UNA VALIDACIÓN SIMILAR Y NO TIENE PROBLEMA.
HashTable *ht;
ht = Z_ARRVAL_P(values);
count = zend_hash_num_elements(ht);
if((result =
(char**)emalloc(sizeof(char*) * (count + 1))) == NULL) {
return result;
}
for (zend_hash_internal_pointer_reset(ht);
zend_hash_has_more_elements(ht) == SUCCESS;
zend_hash_move_forward(ht)) {
char *str;
uint len;
ulong idx;
int type;
zval **data;
type = zend_hash_get_current_key_ex(ht, &str, &len, &idx, 0, NULL);
/* Get the names stored in a standard array */
if(type == HASH_KEY_IS_LONG) {
if ((zend_hash_get_current_data(ht, (void**)&data) == SUCCESS) &&
Z_TYPE_PP(data) == IS_STRING &&
strcmp(Z_STRVAL_PP
(data
), ROOT_SYMBOL
)) { /* do not ignore "main" */ result[ix] = estrdup(Z_STRVAL_PP(data));
ix++;
}
}
}
} else if(values->type == IS_STRING) { //ESTA ES LA LÍNEA QUE MARCA EL ERROR
if((result = (char**)emalloc(sizeof(char*) * 2)) == NULL) {
return result;
}
result[0] = estrdup(Z_STRVAL_P(values));
ix = 1;
} else {
result = NULL;
}
/* NULL terminate the array */
if (result != NULL) {
result[ix] = NULL;
}
return result;
}
Espero alguien me pueda ayudar con este tema.
Como datos adicionales:
Sistema Operativo: Fedora 25
PHP: 7.1.1 ... Zend Engine v3.1.0
Saludos y gracias por su tiempo.
EDITO: en el fragmento que les paso, las líneas a las que hago referencia son la 10 y 41