Fix for structure size mismatch in switch_file_stat
This commit is contained in:
parent
a430213bc0
commit
a165917a3d
|
@ -692,7 +692,7 @@ typedef gid_t switch_gid_t;
|
|||
typedef ino_t switch_ino_t;
|
||||
typedef dev_t switch_dev_t;
|
||||
#endif
|
||||
typedef off_t switch_off_t;
|
||||
typedef off64_t switch_off_t;
|
||||
|
||||
/**
|
||||
* Structure for referencing file information
|
||||
|
|
|
@ -421,6 +421,7 @@ SWITCH_DECLARE(switch_status_t) switch_file_stat(switch_finfo_t *finfo, const ch
|
|||
apr_status_t status;
|
||||
apr_finfo_t aprinfo;
|
||||
if (sizeof(*finfo) != sizeof(aprinfo)) {
|
||||
fprintf(stderr, "Error:structure file mismatch switch_finfo_t:%u apr_finfo_t:%u\n", sizeof(*finfo), sizeof(aprinfo));
|
||||
return SWITCH_STATUS_MEMERR;
|
||||
}
|
||||
status = apr_stat(&aprinfo, fname, wanted, pool);
|
||||
|
|
Loading…
Reference in New Issue