On Sun, Mar 28, 2004 at 10:28:49PM +0200, Christian Perrier wrote: > This happend while I was trying to build a NMU for getting all shadow > translations out of BTS.... > > Can someone with more coding skills than me have a look at it? > > ----- Forwarded message from Christian Perrier <[EMAIL PROTECTED]> ----- ... > if /bin/sh ../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../lib > -O2 -Wall -MT sub.lo -MD -MP -MF ".deps/sub.Tpo" \ > -c -o sub.lo `test -f 'sub.c' || echo './'`sub.c; \ > then mv -f ".deps/sub.Tpo" ".deps/sub.Plo"; \ > else rm -f ".deps/sub.Tpo"; exit 1; \ > fi > gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../lib -O2 -Wall -MT sub.lo -MD -MP -MF > .deps/sub.Tpo -c sub.c -o sub.o > sub.c: In function `subsystem': > sub.c:81: error: increment of read-only member `pw_shell' > make[3]: *** [sub.lo] Erreur 1 > make[3]: quittant le r?pertoire ? > /home/bubulle/src/debian/shadow/shadow-4.0.3/libmisc ? > make[2]: *** [all-recursive] Erreur 1 > make[2]: quittant le r?pertoire ? /home/bubulle/src/debian/shadow/shadow-4.0.3 ? > make[1]: *** [all] Erreur 2 > make[1]: quittant le r?pertoire ? /home/bubulle/src/debian/shadow/shadow-4.0.3 ? > make: *** [build] Erreur 2
GCC has become much more sensitive about writes to read-only variables recently. The attached patch should fix the problem. -- Matt Kraai [EMAIL PROTECTED] http://ftbfs.org/
diff -ru shadow-4.0.3-old/lib/prototypes.h shadow-4.0.3/lib/prototypes.h --- shadow-4.0.3-old/lib/prototypes.h 2004-03-29 00:27:22.000000000 -0800 +++ shadow-4.0.3/lib/prototypes.h 2004-03-29 00:29:58.000000000 -0800 @@ -203,7 +203,7 @@ extern void sulog(const char *, int, const char *, const char *); /* sub.c */ -extern void subsystem(const struct passwd *); +extern void subsystem(struct passwd *); /* ttytype.c */ extern void ttytype(const char *); diff -ru shadow-4.0.3-old/libmisc/sub.c shadow-4.0.3/libmisc/sub.c --- shadow-4.0.3-old/libmisc/sub.c 2004-03-29 00:27:22.000000000 -0800 +++ shadow-4.0.3/libmisc/sub.c 2004-03-29 00:29:39.000000000 -0800 @@ -51,7 +51,7 @@ */ void -subsystem(const struct passwd *pw) +subsystem(struct passwd *pw) { /* * The new root directory must begin with a "/" character.