diff options
Diffstat (limited to 'sys-apps/mkinitrd/files/mkinitrd-ds-grubby_compile.patch')
-rw-r--r-- | sys-apps/mkinitrd/files/mkinitrd-ds-grubby_compile.patch | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/sys-apps/mkinitrd/files/mkinitrd-ds-grubby_compile.patch b/sys-apps/mkinitrd/files/mkinitrd-ds-grubby_compile.patch new file mode 100644 index 0000000..c5502d8 --- /dev/null +++ b/sys-apps/mkinitrd/files/mkinitrd-ds-grubby_compile.patch @@ -0,0 +1,27 @@ +diff -dPNur mkinitrd-4.2.17/grubby/grubby.c mkinitrd-4.2.17-ds/grubby/grubby.c +--- mkinitrd-4.2.17/grubby/grubby.c 2005-04-05 17:39:21.000000000 +0200 ++++ mkinitrd-4.2.17-ds/grubby/grubby.c 2010-01-30 00:21:16.000000000 +0100 +@@ -239,7 +239,6 @@ + struct singleEntry * findEntryByPath(struct grubConfig * cfg, + const char * path, const char * prefix, + int * index); +-static char * strndup(char * from, int len); + static int readFile(int fd, char ** bufPtr); + static void lineInit(struct singleLine * line); + static void lineFree(struct singleLine * line); +@@ -249,15 +248,6 @@ + struct configFileInfo * cfi); + static char * getRootSpecifier(char * str); + +-static char * strndup(char * from, int len) { +- char * to; +- +- to = malloc(len + 1); +- strncpy(to, from, len); +- to[len] = '\0'; +- +- return to; +-} + + static char * sdupprintf(const char *format, ...) + #ifdef __GNUC__ |