fix compile error with 2.4

SVN-Revision: 9137
This commit is contained in:
Felix Fietkau 2007-10-05 13:05:22 +00:00
parent 258843f666
commit 06cc9686a6

View File

@ -1,7 +1,7 @@
Index: busybox-1.7.2/modutils/insmod.c Index: busybox-1.7.2/modutils/insmod.c
=================================================================== ===================================================================
--- busybox-1.7.2.orig/modutils/insmod.c 2007-09-03 13:48:35.000000000 +0200 --- busybox-1.7.2.orig/modutils/insmod.c 2007-10-05 14:39:19.922555340 +0200
+++ busybox-1.7.2/modutils/insmod.c 2007-10-05 01:43:47.686834357 +0200 +++ busybox-1.7.2/modutils/insmod.c 2007-10-05 14:59:26.327304435 +0200
@@ -61,19 +61,107 @@ @@ -61,19 +61,107 @@
#include "libbb.h" #include "libbb.h"
#include <libgen.h> #include <libgen.h>
@ -160,7 +160,7 @@ Index: busybox-1.7.2/modutils/insmod.c
static struct obj_file *arch_new_file(void) static struct obj_file *arch_new_file(void)
{ {
struct arch_file *f; struct arch_file *f;
@@ -3952,33 +4008,35 @@ @@ -3952,33 +4008,33 @@
void print_load_map(struct obj_file *f); void print_load_map(struct obj_file *f);
#endif #endif
@ -169,13 +169,13 @@ Index: busybox-1.7.2/modutils/insmod.c
+int insmod_main_24( int argc, char **argv) +int insmod_main_24( int argc, char **argv)
{ {
char *opt_o, *arg1; char *opt_o, *arg1;
int len; - int len;
int k_crcs; int k_crcs;
- char *tmp, *tmp1; - char *tmp, *tmp1;
unsigned long m_size; unsigned long m_size;
ElfW(Addr) m_addr; ElfW(Addr) m_addr;
struct obj_file *f; struct obj_file *f;
struct stat st; - struct stat st;
char *m_name = 0; char *m_name = 0;
- int exit_status = EXIT_FAILURE; - int exit_status = EXIT_FAILURE;
+ int ret = EINVAL; + int ret = EINVAL;
@ -206,7 +206,7 @@ Index: busybox-1.7.2/modutils/insmod.c
/* Parse any options */ /* Parse any options */
getopt32(argv, OPTION_STR, &opt_o); getopt32(argv, OPTION_STR, &opt_o);
arg1 = argv[optind]; arg1 = argv[optind];
@@ -3987,110 +4045,18 @@ @@ -3987,110 +4043,18 @@
m_name = xstrdup(opt_o); m_name = xstrdup(opt_o);
} }
@ -325,7 +325,7 @@ Index: busybox-1.7.2/modutils/insmod.c
f = obj_load(fp, LOADBITS); f = obj_load(fp, LOADBITS);
if (f == NULL) if (f == NULL)
@@ -4120,7 +4086,7 @@ @@ -4120,7 +4084,7 @@
"\t%s was compiled for kernel version %s\n" "\t%s was compiled for kernel version %s\n"
"\twhile this kernel is version %s", "\twhile this kernel is version %s",
flag_force_load ? "warning: " : "", flag_force_load ? "warning: " : "",
@ -334,7 +334,7 @@ Index: busybox-1.7.2/modutils/insmod.c
if (!flag_force_load) if (!flag_force_load)
goto out; goto out;
} }
@@ -4173,7 +4139,7 @@ @@ -4173,7 +4137,7 @@
hide_special_symbols(f); hide_special_symbols(f);
#if ENABLE_FEATURE_INSMOD_KSYMOOPS_SYMBOLS #if ENABLE_FEATURE_INSMOD_KSYMOOPS_SYMBOLS
@ -343,7 +343,7 @@ Index: busybox-1.7.2/modutils/insmod.c
#endif /* FEATURE_INSMOD_KSYMOOPS_SYMBOLS */ #endif /* FEATURE_INSMOD_KSYMOOPS_SYMBOLS */
new_create_module_ksymtab(f); new_create_module_ksymtab(f);
@@ -4220,8 +4186,7 @@ @@ -4220,8 +4184,7 @@
if (flag_print_load_map) if (flag_print_load_map)
print_load_map(f); print_load_map(f);
@ -353,14 +353,15 @@ Index: busybox-1.7.2/modutils/insmod.c
out: out:
#if ENABLE_FEATURE_CLEAN_UP #if ENABLE_FEATURE_CLEAN_UP
if (fp) if (fp)
@@ -4229,21 +4194,13 @@ @@ -4229,21 +4192,13 @@
free(tmp1); free(tmp1);
if (!tmp1) if (!tmp1)
free(m_name); free(m_name);
- free(m_filename); - free(m_filename);
+ free(g_filename); + free(g_filename);
#endif #endif
return exit_status; - return exit_status;
+ return ret;
} }
- -
- -
@ -376,7 +377,7 @@ Index: busybox-1.7.2/modutils/insmod.c
/* We use error numbers in a loose translation... */ /* We use error numbers in a loose translation... */
static const char *moderror(int err) static const char *moderror(int err)
{ {
@@ -4261,19 +4218,33 @@ @@ -4261,19 +4216,33 @@
} }
} }
@ -415,7 +416,7 @@ Index: busybox-1.7.2/modutils/insmod.c
/* Rest is options */ /* Rest is options */
options = xzalloc(1); options = xzalloc(1);
optlen = 0; optlen = 0;
@@ -4283,36 +4254,46 @@ @@ -4283,36 +4252,46 @@
optlen += sprintf(options + optlen, (strchr(*argv,' ') ? "\"%s\" " : "%s "), *argv); optlen += sprintf(options + optlen, (strchr(*argv,' ') ? "\"%s\" " : "%s "), *argv);
} }