Fix stat time fields

This commit is contained in:
Ron Pedde 2003-12-09 15:56:17 +00:00
parent e37be38297
commit eac98e0a61
2 changed files with 7 additions and 1 deletions

View File

@ -34,7 +34,7 @@ case $host in
*linux*)
CPPFLAGS="$CPPFLAGS -DHAVE_SOCKLEN_T";;
*darwin*)
CPPFLAGS="$CPPFLAGS -no-cpp-precomp -DHAVE_SOCKADDR_SA_LEN -DHAVE_SOCKLEN_T"
CPPFLAGS="$CPPFLAGS -no-cpp-precomp -DHAVE_SOCKADDR_SA_LEN -DHAVE_SOCKLEN_T -DMAC"
LDFLAGS="$LDFLAGS -framework CoreFoundation"
AM_CONDITIONAL(COND_REND_OSX,true)

View File

@ -346,9 +346,15 @@ int scan_foreground(char *path) {
mp3file.path=mp3_path;
mp3file.fname=de.d_name;
#ifdef MAC /* wtf is this about? */
mp3file.mtime=sb.st_mtimespec.tv_sec;
mp3file.atime=sb.st_atimespec.tv_sec;
mp3file.ctime=sb.st_ctimespec.tv_sec;
#else
mp3file.mtime=sb.st_mtime;
mp3file.atime=sb.st_atime;
mp3file.ctime=sb.st_ctime;
#endif
/* FIXME; assumes that st_ino is a u_int_32 */
mp3file.id=sb.st_ino;