- if (a & ATTR_CMN_CRTIME) *((struct timespec *)attrbufptr)++ = imp->creation_date;
- if (a & ATTR_CMN_MODTIME) *((struct timespec *)attrbufptr)++ = imp->modification_date;
- if (a & ATTR_CMN_CHGTIME) *((struct timespec *)attrbufptr)++ = imp->modification_date;
- if (a & ATTR_CMN_ACCTIME) *((struct timespec *)attrbufptr)++ = imp->modification_date;
+ if (a & ATTR_CMN_CRTIME) {
+ if (is_64_bit) {
+ struct user_timespec *tmpp = ((struct user_timespec *)attrbufptr)++;
+ tmpp->tv_sec = (user_time_t) imp->creation_date.tv_sec;
+ tmpp->tv_nsec = imp->creation_date.tv_nsec;
+ }
+ else {
+ *((struct timespec *)attrbufptr)++ = imp->creation_date;
+ }
+ }
+ if (a & ATTR_CMN_MODTIME) {
+ if (is_64_bit) {
+ struct user_timespec *tmpp = ((struct user_timespec *)attrbufptr)++;
+ tmpp->tv_sec = (user_time_t) imp->modification_date.tv_sec;
+ tmpp->tv_nsec = imp->modification_date.tv_nsec;
+ }
+ else {
+ *((struct timespec *)attrbufptr)++ = imp->modification_date;
+ }
+ }
+ if (a & ATTR_CMN_CHGTIME) {
+ if (is_64_bit) {
+ struct user_timespec *tmpp = ((struct user_timespec *)attrbufptr)++;
+ tmpp->tv_sec = (user_time_t) imp->modification_date.tv_sec;
+ tmpp->tv_nsec = imp->modification_date.tv_nsec;
+ }
+ else {
+ *((struct timespec *)attrbufptr)++ = imp->modification_date;
+ }
+ }
+ if (a & ATTR_CMN_ACCTIME) {
+ if (is_64_bit) {
+ struct user_timespec *tmpp = ((struct user_timespec *)attrbufptr)++;
+ tmpp->tv_sec = (user_time_t) imp->modification_date.tv_sec;
+ tmpp->tv_nsec = imp->modification_date.tv_nsec;
+ }
+ else {
+ *((struct timespec *)attrbufptr)++ = imp->modification_date;
+ }
+ }