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

Bug#287493: lpkg: FTBFS (amd64/gcc-4.0): invalid lvalue in assignment



Package: lpkg
Severity: normal
Tags: patch

When building 'lpkg' on amd64 with gcc-4.0,
I get the following error:

gcc -O2   -c -o main.o main.c
main.c: In function 'usage':
main.c:105: warning: incompatible implicit declaration of built-in function 'exit'
main.c: In function 'main':
main.c:150: warning: incompatible implicit declaration of built-in function 'exit'
main.c:162: warning: incompatible implicit declaration of built-in function 'exit'
main.c:166: error: invalid lvalue in assignment
make[1]: *** [main.o] Error 1
make[1]: Leaving directory `/lpkg-19980629'
make: *** [build-stamp] Error 2

With the attached patch 'lpkg' can be compiled
on amd64 using gcc-4.0.

Regards
Andreas Jochens

diff -urN ../tmp-orig/lpkg-19980629/main.c ./main.c
--- ../tmp-orig/lpkg-19980629/main.c	1998-06-14 21:36:00.000000000 +0200
+++ ./main.c	2004-12-28 10:12:48.069895056 +0100
@@ -163,7 +163,7 @@
 	}
 
 	fstat(fd,&st);
-	(unsigned long)*(lt3+12)=htonl(st.st_size);
+	*(lt3+12)=htonl(st.st_size);
 
 	fprintf(stderr,"Waiting...");
 	waitConnection();



Reply to: