summaryrefslogtreecommitdiff
blob: b8f4842c60a7286ca1fae01dbd4a924b231ecc3f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
diff -ur mkinitrd-4.2.0.3.orig/grubby/grubby.c mkinitrd-4.2.0.3/grubby/grubby.c
--- mkinitrd-4.2.0.3.orig/grubby/grubby.c	2005-01-19 06:29:14.000000000 +0200
+++ mkinitrd-4.2.0.3/grubby/grubby.c	2009-08-09 19:19:41.000000000 +0300
@@ -239,7 +239,9 @@
 struct singleEntry * findEntryByPath(struct grubConfig * cfg, 
 				     const char * path, const char * prefix,
 				     int * index);
+#ifndef strndup
 static char * strndup(char * from, int len);
+#endif
 static int readFile(int fd, char ** bufPtr);
 static void lineInit(struct singleLine * line);
 static void lineFree(struct singleLine * line);
@@ -249,6 +251,7 @@
 		       struct configFileInfo * cfi);
 static char * getRootSpecifier(char * str);
 
+#ifndef strndup
 static char * strndup(char * from, int len) {
     char * to;
 
@@ -258,6 +261,7 @@
 
     return to;
 }
+#endif
 
 static char * sdupprintf(const char *format, ...)
 #ifdef __GNUC__