diff options
author | Pavel Roskin <proski@gnu.org> | 2000-09-28 20:52:55 +0000 |
---|---|---|
committer | Pavel Roskin <proski@gnu.org> | 2000-09-28 20:52:55 +0000 |
commit | 43f3e6114c175a838161bfb547f469ecdb600c87 (patch) | |
tree | 2e0952a6b77d9acbcc232345489ef116fab7eab0 | |
parent | 8d369e98a5f0fb7612b3d09ff889394bf7ec4f5c (diff) | |
download | busybox-w32-43f3e6114c175a838161bfb547f469ecdb600c87.tar.gz busybox-w32-43f3e6114c175a838161bfb547f469ecdb600c87.tar.bz2 busybox-w32-43f3e6114c175a838161bfb547f469ecdb600c87.zip |
Fixes to allow compilation on systems with glibc 2.1.92
-rw-r--r-- | insmod.c | 9 | ||||
-rw-r--r-- | miscutils/update.c | 5 | ||||
-rw-r--r-- | modutils/insmod.c | 9 | ||||
-rw-r--r-- | update.c | 5 |
4 files changed, 24 insertions, 4 deletions
@@ -77,7 +77,7 @@ | |||
77 | #ifndef MODUTILS_MODULE_H | 77 | #ifndef MODUTILS_MODULE_H |
78 | #define MODUTILS_MODULE_H 1 | 78 | #define MODUTILS_MODULE_H 1 |
79 | 79 | ||
80 | #ident "$Id: insmod.c,v 1.25 2000/09/25 21:45:58 andersen Exp $" | 80 | #ident "$Id: insmod.c,v 1.26 2000/09/28 20:52:55 proski Exp $" |
81 | 81 | ||
82 | /* This file contains the structures used by the 2.0 and 2.1 kernels. | 82 | /* This file contains the structures used by the 2.0 and 2.1 kernels. |
83 | We do not use the kernel headers directly because we do not wish | 83 | We do not use the kernel headers directly because we do not wish |
@@ -283,7 +283,7 @@ int delete_module(const char *); | |||
283 | #ifndef MODUTILS_OBJ_H | 283 | #ifndef MODUTILS_OBJ_H |
284 | #define MODUTILS_OBJ_H 1 | 284 | #define MODUTILS_OBJ_H 1 |
285 | 285 | ||
286 | #ident "$Id: insmod.c,v 1.25 2000/09/25 21:45:58 andersen Exp $" | 286 | #ident "$Id: insmod.c,v 1.26 2000/09/28 20:52:55 proski Exp $" |
287 | 287 | ||
288 | /* The relocatable object is manipulated using elfin types. */ | 288 | /* The relocatable object is manipulated using elfin types. */ |
289 | 289 | ||
@@ -323,7 +323,12 @@ int delete_module(const char *); | |||
323 | /* this is the previous behavior, but it does result in | 323 | /* this is the previous behavior, but it does result in |
324 | insmod.c being broken on anything except i386 */ | 324 | insmod.c being broken on anything except i386 */ |
325 | 325 | ||
326 | #ifndef EM_486 | ||
327 | #define MATCH_MACHINE(x) (x == EM_386) | ||
328 | #else | ||
326 | #define MATCH_MACHINE(x) (x == EM_386 || x == EM_486) | 329 | #define MATCH_MACHINE(x) (x == EM_386 || x == EM_486) |
330 | #endif | ||
331 | |||
327 | #define SHT_RELM SHT_REL | 332 | #define SHT_RELM SHT_REL |
328 | #define Elf32_RelM Elf32_Rel | 333 | #define Elf32_RelM Elf32_Rel |
329 | 334 | ||
diff --git a/miscutils/update.c b/miscutils/update.c index e9f496913..7279d83a8 100644 --- a/miscutils/update.c +++ b/miscutils/update.c | |||
@@ -72,7 +72,12 @@ extern int update_main(int argc, char **argv) | |||
72 | /* Become a proper daemon */ | 72 | /* Become a proper daemon */ |
73 | setsid(); | 73 | setsid(); |
74 | chdir("/"); | 74 | chdir("/"); |
75 | #ifdef OPEN_MAX | ||
75 | for (pid = 0; pid < OPEN_MAX; pid++) close(pid); | 76 | for (pid = 0; pid < OPEN_MAX; pid++) close(pid); |
77 | #else | ||
78 | /* glibc 2.1.92 requires using sysconf(_SC_OPEN_MAX) */ | ||
79 | for (pid = 0; pid < sysconf(_SC_OPEN_MAX); pid++) close(pid); | ||
80 | #endif | ||
76 | 81 | ||
77 | /* | 82 | /* |
78 | * This is no longer necessary since 1.3.5x, but it will harmlessly | 83 | * This is no longer necessary since 1.3.5x, but it will harmlessly |
diff --git a/modutils/insmod.c b/modutils/insmod.c index 0c81af6f0..8267606e1 100644 --- a/modutils/insmod.c +++ b/modutils/insmod.c | |||
@@ -77,7 +77,7 @@ | |||
77 | #ifndef MODUTILS_MODULE_H | 77 | #ifndef MODUTILS_MODULE_H |
78 | #define MODUTILS_MODULE_H 1 | 78 | #define MODUTILS_MODULE_H 1 |
79 | 79 | ||
80 | #ident "$Id: insmod.c,v 1.25 2000/09/25 21:45:58 andersen Exp $" | 80 | #ident "$Id: insmod.c,v 1.26 2000/09/28 20:52:55 proski Exp $" |
81 | 81 | ||
82 | /* This file contains the structures used by the 2.0 and 2.1 kernels. | 82 | /* This file contains the structures used by the 2.0 and 2.1 kernels. |
83 | We do not use the kernel headers directly because we do not wish | 83 | We do not use the kernel headers directly because we do not wish |
@@ -283,7 +283,7 @@ int delete_module(const char *); | |||
283 | #ifndef MODUTILS_OBJ_H | 283 | #ifndef MODUTILS_OBJ_H |
284 | #define MODUTILS_OBJ_H 1 | 284 | #define MODUTILS_OBJ_H 1 |
285 | 285 | ||
286 | #ident "$Id: insmod.c,v 1.25 2000/09/25 21:45:58 andersen Exp $" | 286 | #ident "$Id: insmod.c,v 1.26 2000/09/28 20:52:55 proski Exp $" |
287 | 287 | ||
288 | /* The relocatable object is manipulated using elfin types. */ | 288 | /* The relocatable object is manipulated using elfin types. */ |
289 | 289 | ||
@@ -323,7 +323,12 @@ int delete_module(const char *); | |||
323 | /* this is the previous behavior, but it does result in | 323 | /* this is the previous behavior, but it does result in |
324 | insmod.c being broken on anything except i386 */ | 324 | insmod.c being broken on anything except i386 */ |
325 | 325 | ||
326 | #ifndef EM_486 | ||
327 | #define MATCH_MACHINE(x) (x == EM_386) | ||
328 | #else | ||
326 | #define MATCH_MACHINE(x) (x == EM_386 || x == EM_486) | 329 | #define MATCH_MACHINE(x) (x == EM_386 || x == EM_486) |
330 | #endif | ||
331 | |||
327 | #define SHT_RELM SHT_REL | 332 | #define SHT_RELM SHT_REL |
328 | #define Elf32_RelM Elf32_Rel | 333 | #define Elf32_RelM Elf32_Rel |
329 | 334 | ||
@@ -72,7 +72,12 @@ extern int update_main(int argc, char **argv) | |||
72 | /* Become a proper daemon */ | 72 | /* Become a proper daemon */ |
73 | setsid(); | 73 | setsid(); |
74 | chdir("/"); | 74 | chdir("/"); |
75 | #ifdef OPEN_MAX | ||
75 | for (pid = 0; pid < OPEN_MAX; pid++) close(pid); | 76 | for (pid = 0; pid < OPEN_MAX; pid++) close(pid); |
77 | #else | ||
78 | /* glibc 2.1.92 requires using sysconf(_SC_OPEN_MAX) */ | ||
79 | for (pid = 0; pid < sysconf(_SC_OPEN_MAX); pid++) close(pid); | ||
80 | #endif | ||
76 | 81 | ||
77 | /* | 82 | /* |
78 | * This is no longer necessary since 1.3.5x, but it will harmlessly | 83 | * This is no longer necessary since 1.3.5x, but it will harmlessly |