Created attachment 295287 [details, diff] 0004-Check-utimensat-availability.patch Build failed with: In file included from include_applets.h:15:0, from main.c:1170: qmerge.c: In function 'merge_tree_at': qmerge.c:615:17: error: 'struct stat' has no member named 'st_mtim' qmerge.c:616:17: error: 'struct stat' has no member named 'st_mtim' qmerge.c:617:4: warning: implicit declaration of function 'futimens' qmerge.c:617:4: warning: nested extern declaration of 'futimens' qmerge.c:658:17: error: 'struct stat' has no member named 'st_mtim' qmerge.c:659:17: error: 'struct stat' has no member named 'st_mtim' qmerge.c:660:4: warning: implicit declaration of function 'utimensat' qmerge.c:660:4: warning: nested extern declaration of 'utimensat' I don't know this patch is enough.. but this make it build pass.
considering it's part of POSIX, i'm not sure i want to bother supporting non-POSIX setups in portage-utils as it'll turn into an ifdef mess http://pubs.opengroup.org/onlinepubs/9699919799/functions/futimens.html
it would really make things much easier if the package could get autotooled
just autotooling it wouldn't help. i'd still ifdef garbage in the source. it'd need autotooling & merging of gnulib so i wouldn't have to worrying about portability crap. i guess we've hit that point with portage-utils.
I don't think we really need gnulib, but I have nothing against that approach either.
i'm not going to accept #ifdef's around functions (like the proposed patch here does). a basic autotools port wouldn't solve that problem. it'd simply allow collapsing the ifdef checks to a single one: #ifdef HAVE_UTIMENSAT. but the ifdef still exists which i don't want (because i'd have to consider how to implement the functionality in question rather than just disabling it) which means autotools wouldn't help. adding gnulib would solve that because i can continue to assume funcs like utimensat/getline/etc... exist even when on older/stupid systems.
It's ok. I forgot we already use gnulib for portage-utils on the platforms that need it.
i've added a portage-utils-0.7 to the tree which includes autotools/gnulib. but they only get executed on non-Linux systems. i imagine this should fix any bsd build issues, as well as allow the prefix guys to merge their external changes back into the main tree.