<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Dave Anderson wrote:
<blockquote TYPE=CITE>
<br><tt>Castor's patch fixed a 2.x gcc compiler failure here because</tt>
<br><tt>of the inadvertant double semi-colon:</tt>
<p><tt>@@ -52,7 +52,7 @@</tt>
<br><tt> kernel_init(int when)</tt>
<br><tt> {</tt>
<br><tt> int i;</tt>
<br><tt>- char *p1, *p2, buf[BUFSIZE];;</tt>
<br><tt>+ char *p1, *p2, buf[BUFSIZE];</tt>
<br><tt> struct syment *sp1,
*sp2;</tt>
<p><tt>...which I wasn't aware of, since I haven't been testing builds
with</tt>
<br><tt>that era compiler for a some time now. But in doing so, I
see that</tt>
<br><tt>gcc 2.96 won't compile diskdump.c either:</tt>
<p><tt>cc -c -g -DX86 -D_FILE_OFFSET_BITS=64 diskdump.c</tt>
<br><tt>In file included from diskdump.c:24:</tt>
<br><tt>diskdump.h:49: array size missing in `tasks'</tt>
<br><tt>make[3]: *** [diskdump.o] Error 1</tt>
<p><tt>because of the tasks member at the end of this struct:</tt>
<p><tt>struct disk_dump_header {</tt>
<br><tt> char
signature[SIG_LEN]; /* = "DISKDUMP" */</tt>
<br><tt> int
header_version; /* Dump header version */</tt>
<br><tt> struct new_utsname
utsname; /* copy of system_utsname
*/</tt>
<br><tt> struct timeval
timestamp; /* Time stamp */</tt>
<br><tt> unsigned int
status; /* Above flags
*/</tt>
<br><tt> int
block_size; /* Size of a block in byte */</tt>
<br><tt> int
sub_hdr_size; /* Size of arch dependent</tt>
<br><tt>
header in blocks */</tt>
<br><tt> unsigned int
bitmap_blocks; /* Size of Memory bitmap in</tt>
<br><tt>
block */</tt>
<br><tt> unsigned int
max_mapnr; /* = max_mapnr */</tt>
<br><tt> unsigned int
total_ram_blocks;/* Number of blocks should be</tt>
<br><tt>
written */</tt>
<br><tt> unsigned int
device_blocks; /* Number of total blocks in</tt>
<br><tt>
* the dump device */</tt>
<br><tt> unsigned int
written_blocks; /* Number of written blocks */</tt>
<br><tt> unsigned int
current_cpu; /* CPU# which handles dump */</tt>
<br><tt> int
nr_cpus; /* Number of CPUs */</tt>
<br><tt> struct task_struct
*tasks[];</tt>
<br><tt>};</tt>
<p><tt>Can this be changed to: struct task_struct **tasks;</tt>
<br><tt>and get away with it?</tt></blockquote>
<tt>or should it be:</tt>
<p><tt> struct task_struct
*tasks[0];</tt>
<p><tt>Dave</tt></html>