Bug 2515

Summary: date.c may need _SVID_SOURCE=1
Product: Busybox Reporter: Sergio Costas <raster>
Component: OtherAssignee: unassigned
Status: RESOLVED WORKSFORME    
Severity: critical CC: busybox-cvs
Priority: P5    
Version: 1.17.x   
Target Milestone: ---   
Hardware: Other   
OS: Linux   
Host: X86 Target: Mips
Build:
Attachments: Patch to fix the compilation error in date.c

Description Sergio Costas 2010-09-04 15:12:00 UTC
Created attachment 2437 [details]
Patch to fix the compilation error in date.c

I've been cross-compiling busybox under Gentoo for MIPS, and version 1.17.1 is impossible to compile because it returns the error:

coreutils/date.c: In function 'date_main':
coreutils/date.c:210: error: 'struct stat' has no member named 'st_mtim'

The bug is in your official version too.

I attach a patch which fixes it (I sent it to Gentoo too).
Comment 1 Denys Vlasenko 2010-09-17 16:45:50 UTC
Different libc's require different magic to refer to nanosecond times in struct stat.

Does it help if you add

#define _SVID_SOURCE 1

in date.c?
Comment 2 Denys Vlasenko 2010-10-28 22:29:55 UTC
Ping?