Robert Millan <r...@aybabtu.com> writes: > When importing getline.c into GNU GRUB, it failed to build due to undefined > ssize_t. Here's a fix (I believe including <sys/types.h> is portable enough, > please let me know if I'm wrong).
I don't your this patch is the right solution -- the gnulib getline module depends on the stdio module, which contains this: #if ((@GNULIB_FSEEKO@ && @REPLACE_FSEEKO@) \ || (@GNULIB_FTELLO@ && @REPLACE_FTELLO@) \ || (@GNULIB_GETDELIM@ && !...@have_decl_getdelim@) \ || (@GNULIB_GETLINE@ && (!...@have_decl_getline@ || @REPLACE_GETLINE@)) \ || defined GNULIB_POSIXCHECK) /* Get off_t and ssize_t. */ # include <sys/types.h> #endif Aren't you using the gnulib stdio module, or is the code not working somehow? If you don't want to use the gnulib stdio module, you could add your patch into a gnulib local directory. But there are no guarantees the gnulib getline module will work in this case. /Simon