glibc-2.16 doesn't expose gets anymore: LSB deprecates gets(). POSIX.1-2008 marks gets() obsolescent. ISO C11 removes the specification of gets() from the C language, and since version 2.16, glibc header files don't expose the function declaration if the _ISOC11_SOURCE feature test macro is defined. So current build fails like this: In file included from /tmp/tmpfs/portage/sys-boot/grub-2.00/work/grub-2.00/grub-core/gnulib/argp.h:22:0, from /tmp/tmpfs/portage/sys-boot/grub-2.00/work/grub-2.00/grub-core/gnulib/argp-parse.c:42: ./stdio.h:456:1: error: 'gets' undeclared here (not in a function) make[4]: *** [argp-fmtstream.o] Error 1 Fix is simple and shouldn't break things with older glibc, check that gets is defined before trying to undef it, patch attached. Reproducible: Always
Created attachment 317097 [details, diff] grub-2.00-remove-gets.patch
Could you please submit your change upstream on the grub-devel mailing list? https://lists.gnu.org/mailman/listinfo/grub-devel
(In reply to comment #2) > Could you please submit your change upstream on the grub-devel mailing list? > > https://lists.gnu.org/mailman/listinfo/grub-devel Sure, done http://lists.gnu.org/archive/html/grub-devel/2012-07/msg00007.html
this isn't a bug in grub. it's from gnulib which they import from a diff project (gnulib). i've applied the same patch as other projects. http://sources.gentoo.org/sys-boot/grub/grub-2.00.ebuild?r1=1.10&r2=1.11 http://sources.gentoo.org/sys-boot/grub/files/grub-2.00-no-gets.patch?rev=1.1