[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#278043: macintosh: cannot compile because of syntax error



Package: kernel-source-2.4.26
Version: 2.4.26-6
Severity: normal

While compiling the kernel with a correct config file from kernel 2.4.25:
___

make[4]: Entering directory
`/surplus/system/src/kernel-source-2.4.26/drivers/macintosh'
gcc -D__KERNEL__ -I/surplus/system/src/kernel-source-2.4.26/include -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -O2 -fomit-frame-pointer -I/surplus/system/src/kernel-source-2.4.26/arch/ppc -fsigned-char -msoft-float -pipe -ffixed-r2 -Wno-uninitialized -mmultiple -mstring -nostdinc -iwithprefix include -DKBUILD_BASENAME=nvram  -c -o nvram.o nvram.c
nvram.c: Dans la fonction « read_nvram »:
nvram.c:41: error: erreur d'analyse syntaxique before "unsigned"
nvram.c:46: error: `i' undeclared (first use in this function)
nvram.c:46: error: (Each undeclared identifier is reported only once
nvram.c:46: error: for each function it appears in.)
nvram.c:48: attention : left-hand operand of comma expression has no effect
make[4]: *** [nvram.o] Error 1
___

If we look at the source (/usr/src/kernel-source-2.4.26/drivers/macintosh/nvram.c), we can see that:
___

	37 static ssize_t read_nvram(struct file *file, char *buf,
	38            size_t count, loff_t *ppos)
	39 {
	40    loff_t n = *ppos
	41    unsigned int i = n;
	42    char *p = buf;
	43 
___

So I added a semicolon at the end of line 40, and the compiler accepted it.
Happy patching :)

LT-P

-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing')
Architecture: powerpc (ppc)
Kernel: Linux 2.4.25-ltp
Locale: LANG=fr_FR@euro, LC_CTYPE=fr_FR@euro

Versions of packages kernel-source-2.4.26 depends on:
ii  binutils                      2.15-4     The GNU assembler, linker and bina
ii  bzip2                         1.0.2-1    A high-quality block-sorting file 
ii  coreutils [fileutils]         5.2.1-2    The GNU core utilities
ii  fileutils                     5.2.1-2    The GNU file management utilities 

-- no debconf information



Reply to: