1 |
flameeyes 08/11/03 06:38:31 |
2 |
|
3 |
Added: freeipmi-0.6.10+glibc-2.8.patch |
4 |
Log: |
5 |
Version bump to version 0.6.10, closes bug #245113 by Badalian Slava, and add a patch to build with glibc 2.8, closes bug #241422. |
6 |
(Portage version: 2.2_rc13/cvs/Linux 2.6.27-gentoo-r2 x86_64) |
7 |
|
8 |
Revision Changes Path |
9 |
1.1 sys-libs/freeipmi/files/freeipmi-0.6.10+glibc-2.8.patch |
10 |
|
11 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-libs/freeipmi/files/freeipmi-0.6.10+glibc-2.8.patch?rev=1.1&view=markup |
12 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-libs/freeipmi/files/freeipmi-0.6.10+glibc-2.8.patch?rev=1.1&content-type=text/plain |
13 |
|
14 |
Index: freeipmi-0.6.10+glibc-2.8.patch |
15 |
=================================================================== |
16 |
Index: freeipmi-0.6.10/ipmi-oem/src/ipmi-oem-argp.c |
17 |
=================================================================== |
18 |
--- freeipmi-0.6.10.orig/ipmi-oem/src/ipmi-oem-argp.c |
19 |
+++ freeipmi-0.6.10/ipmi-oem/src/ipmi-oem-argp.c |
20 |
@@ -93,6 +93,7 @@ parse_opt (int key, char *arg, struct ar |
21 |
} |
22 |
else |
23 |
{ |
24 |
+#if 0 |
25 |
if (cmd_args->oem_options_count < ARG_MAX) |
26 |
{ |
27 |
if (!(cmd_args->oem_options[cmd_args->oem_options_count] = strdup(arg))) |
28 |
@@ -103,6 +104,7 @@ parse_opt (int key, char *arg, struct ar |
29 |
cmd_args->oem_options_count++; |
30 |
break; |
31 |
} |
32 |
+#endif |
33 |
} |
34 |
break; |
35 |
} |
36 |
@@ -126,7 +128,9 @@ ipmi_oem_argp_parse (int argc, char **ar |
37 |
|
38 |
cmd_args->oem_id = NULL; |
39 |
cmd_args->oem_command = NULL; |
40 |
+#if 0 |
41 |
memset (cmd_args->oem_options, 0, sizeof(cmd_args->oem_options)); |
42 |
+#endif |
43 |
cmd_args->oem_options_count = 0; |
44 |
|
45 |
argp_parse (&argp, argc, argv, ARGP_IN_ORDER, NULL, cmd_args); |
46 |
Index: freeipmi-0.6.10/ipmi-oem/src/ipmi-oem.h |
47 |
=================================================================== |
48 |
--- freeipmi-0.6.10.orig/ipmi-oem/src/ipmi-oem.h |
49 |
+++ freeipmi-0.6.10/ipmi-oem/src/ipmi-oem.h |
50 |
@@ -20,7 +20,6 @@ |
51 |
#define _IPMI_OEM_H |
52 |
|
53 |
#include <freeipmi/freeipmi.h> |
54 |
-#include <limits.h> /* ARG_MAX */ |
55 |
|
56 |
#include "tool-cmdline-common.h" |
57 |
#include "pstdout.h" |
58 |
@@ -31,7 +30,9 @@ struct ipmi_oem_arguments |
59 |
struct hostrange_cmd_args hostrange; |
60 |
char *oem_id; |
61 |
char *oem_command; |
62 |
+#if 0 |
63 |
char *oem_options[ARG_MAX]; |
64 |
+#endif |
65 |
unsigned int oem_options_count; |
66 |
}; |
67 |
|
68 |
Index: freeipmi-0.6.10/ipmipower/src/Makefile.am |
69 |
=================================================================== |
70 |
--- freeipmi-0.6.10.orig/ipmipower/src/Makefile.am |
71 |
+++ freeipmi-0.6.10/ipmipower/src/Makefile.am |
72 |
@@ -32,7 +32,8 @@ ipmipower_CPPFLAGS = \ |
73 |
-I$(srcdir)/../../ipmidetect/src/libipmidetect \ |
74 |
-I$(srcdir)/../../libfreeipmi/include \ |
75 |
-DWITH_LSD_FATAL_ERROR_FUNC=1 \ |
76 |
- -DWITH_LSD_NOMEM_ERROR_FUNC=1 |
77 |
+ -DWITH_LSD_NOMEM_ERROR_FUNC=1 \ |
78 |
+ -D_GNU_SOURCE |
79 |
|
80 |
noinst_HEADERS= \ |
81 |
argv.h \ |
82 |
Index: freeipmi-0.6.10/ipmi-raw/src/ipmi-raw-argp.c |
83 |
=================================================================== |
84 |
--- freeipmi-0.6.10.orig/ipmi-raw/src/ipmi-raw-argp.c |
85 |
+++ freeipmi-0.6.10/ipmi-raw/src/ipmi-raw-argp.c |
86 |
@@ -24,6 +24,7 @@ |
87 |
#include <stdlib.h> |
88 |
#if STDC_HEADERS |
89 |
#include <string.h> |
90 |
+#include <unistd.h> |
91 |
#endif /* STDC_HEADERS */ |
92 |
#include <argp.h> |
93 |
|
94 |
@@ -139,7 +140,7 @@ ipmi_raw_argp_parse (int argc, char **ar |
95 |
init_hostrange_cmd_args (&(cmd_args->hostrange)); |
96 |
|
97 |
cmd_args->cmd_file = NULL; |
98 |
- memset (cmd_args->cmd, 0, sizeof(cmd_args->cmd)); |
99 |
+ cmd_args->cmd = calloc(sysconf(_SC_ARG_MAX), sizeof(uint8_t)); |
100 |
cmd_args->cmd_length = 0; |
101 |
|
102 |
argp_parse (&argp, argc, argv, ARGP_IN_ORDER, NULL, cmd_args); |
103 |
Index: freeipmi-0.6.10/ipmi-raw/src/ipmi-raw.c |
104 |
=================================================================== |
105 |
--- freeipmi-0.6.10.orig/ipmi-raw/src/ipmi-raw.c |
106 |
+++ freeipmi-0.6.10/ipmi-raw/src/ipmi-raw.c |
107 |
@@ -24,9 +24,9 @@ |
108 |
#include <stdlib.h> |
109 |
#if STDC_HEADERS |
110 |
#include <string.h> |
111 |
+#include <unistd.h> |
112 |
#endif /* STDC_HEADERS */ |
113 |
#include <argp.h> |
114 |
-#include <limits.h> |
115 |
#include <assert.h> |
116 |
|
117 |
#include <freeipmi/freeipmi.h> |
118 |
@@ -46,13 +46,17 @@ ipmi_raw_cmdline (ipmi_raw_state_data_t |
119 |
uint8_t *bytes_rq = NULL; |
120 |
int send_len; |
121 |
int i; |
122 |
- uint8_t bytes_rs[ARG_MAX]; |
123 |
+ uint8_t *bytes_rs; |
124 |
+ long arg_max; |
125 |
int32_t rs_len; |
126 |
|
127 |
assert(state_data); |
128 |
assert(state_data->prog_data->args->cmd); |
129 |
assert(state_data->prog_data->args->cmd_length); |
130 |
|
131 |
+ arg_max = sysconf(_SC_ARG_MAX); |
132 |
+ bytes_rs = calloc(arg_max, sizeof(uint8_t)); |
133 |
+ |
134 |
args = state_data->prog_data->args; |
135 |
|
136 |
bytes_rq = args->cmd; |
137 |
@@ -72,7 +76,7 @@ ipmi_raw_cmdline (ipmi_raw_state_data_t |
138 |
&bytes_rq[2], |
139 |
send_len - 2, |
140 |
bytes_rs, |
141 |
- ARG_MAX)) >= 0) |
142 |
+ arg_max)) >= 0) |
143 |
{ |
144 |
pstdout_printf (state_data->pstate, "rcvd: "); |
145 |
for (i = 0; i < rs_len; i++) |
146 |
@@ -210,13 +214,17 @@ ipmi_raw_stream (ipmi_raw_state_data_t * |
147 |
size_t n = 0; |
148 |
uint8_t *bytes_rq = NULL; |
149 |
int send_len; |
150 |
- uint8_t bytes_rs[ARG_MAX]; |
151 |
+ uint8_t *bytes_rs; |
152 |
+ long arg_max; |
153 |
int32_t rs_len; |
154 |
int i, rv = -1; |
155 |
|
156 |
assert(state_data); |
157 |
assert(stream); |
158 |
|
159 |
+ arg_max = sysconf(_SC_ARG_MAX); |
160 |
+ bytes_rs = calloc(arg_max, sizeof(uint8_t)); |
161 |
+ |
162 |
args = state_data->prog_data->args; |
163 |
|
164 |
while (1) |
165 |
@@ -246,7 +254,7 @@ ipmi_raw_stream (ipmi_raw_state_data_t * |
166 |
&bytes_rq[2], |
167 |
send_len - 2, |
168 |
bytes_rs, |
169 |
- ARG_MAX)) < 0) |
170 |
+ arg_max)) < 0) |
171 |
{ |
172 |
pstdout_fprintf(state_data->pstate, |
173 |
stderr, |
174 |
Index: freeipmi-0.6.10/ipmi-raw/src/ipmi-raw.h |
175 |
=================================================================== |
176 |
--- freeipmi-0.6.10.orig/ipmi-raw/src/ipmi-raw.h |
177 |
+++ freeipmi-0.6.10/ipmi-raw/src/ipmi-raw.h |
178 |
@@ -20,7 +20,6 @@ |
179 |
#define _IPMI_RAW_H |
180 |
|
181 |
#include <freeipmi/freeipmi.h> |
182 |
-#include <limits.h> /* ARG_MAX */ |
183 |
|
184 |
#include "tool-cmdline-common.h" |
185 |
#include "pstdout.h" |
186 |
@@ -35,7 +34,7 @@ struct ipmi_raw_arguments |
187 |
struct common_cmd_args common; |
188 |
struct hostrange_cmd_args hostrange; |
189 |
char *cmd_file; |
190 |
- uint8_t cmd[ARG_MAX]; |
191 |
+ uint8_t *cmd; |
192 |
int cmd_length; |
193 |
}; |