Fix for structure size mismatch in switch_file_stat

This commit is contained in:
David Yat Sin 2010-09-30 08:04:45 -07:00
parent a430213bc0
commit a165917a3d
2 changed files with 2 additions and 1 deletions

View File

@ -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

View File

@ -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);