compile grub2 : error: ‘gets’ undeclared here

if you compile grub2 , you may get “error: ‘gets’ undeclared here yum”, to fix it, run the following command:
sed -i -e '/gets is a security/d' grub-core/gnulib/stdio.in.h