<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>93703</bug_id>
          
          <creation_ts>2005-05-23 08:40 0000</creation_ts>
          <short_desc>net-misc/wget-1.9.1-r5: compile failure in stable</short_desc>
          <delta_ts>2005-07-18 11:16:45 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Core system</component>
          <version>2005.0</version>
          <rep_platform>All</rep_platform>
          <op_sys>Other</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>solar@gentoo.org</reporter>
          <assigned_to>seemant@gentoo.org</assigned_to>
          <cc>liverbugg@juno.com</cc>

      

      
          <long_desc isprivate="0">
            <who>solar@gentoo.org</who>
            <bug_when>2005-05-23 08:40:10 0000</bug_when>
            <thetext>While updating..

[ebuild     U ] net-misc/wget-1.9.1-r5 [1.9.1-r3] -build -debug -ipv6 -nls -socks5 +ssl -static

i686-pc-linux-gnu-gcc -I. -I.    -DHAVE_CONFIG_H -DSYSTEM_WGETRC=\&quot;/etc/wget/wgetrc\&quot; -DLOCALEDIR=\&quot;/usr/share/locale\&quot; -march=i686 -O2 -pipe -I/usr/include/openssl -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DLFS -c ftp-ls.c
ftp.c: In function `getftp&apos;:
ftp.c:923: parse error before `int&apos;
ftp.c:925: `flush_res&apos; undeclared (first use in this function)
ftp.c:925: (Each undeclared identifier is reported only once
ftp.c:925: for each function it appears in.)
make[1]: *** [ftp.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory `/var/tmp/portage/wget-1.9.1-r5/work/wget-1.9.1/src&apos;
make: *** [src] Error 2

!!! ERROR: net-misc/wget-1.9.1-r5 failed.

----------------------------------------------------

The offendeding code comes from
mandrake/009_all_wget-large-file-support.patch and it&apos;s pretty clear why this is wrong.

+  if (*len &gt; 2147483647 &amp;&amp; (*len - restval) &lt;= 0 )
+     {
+       logputs (LOG_VERBOSE, _(&quot;File has already been downloaded. Nothing to do.\n&quot;));
+       /* Close data connection socket.  */
+       closeport (dtsock);
+      /* Close the local file.  */
+       int flush_res;
+       if (con-&gt;cmd &amp; DO_LIST)
+           flush_res = fclose (fp);
+        else
+         flush_res = fflush (fp);
+       return RETRFINISHED;
+     }


Suggestion is to move the int flush_res right below the
+  if (*len &gt; 2147483647 &amp;&amp; (*len - restval) &lt;= 0 ) 
+ {

----------------------------------------------------
Portage 2.0.51.19 (default-linux/x86/gcc2, gcc-2.95.3, glibc-2.2.5-r2,glibc-2.2.5-r9, 2.4.28-grsec-2.1.0 i686)
=================================================================
System uname: 2.4.28-grsec-2.1.0 i686 Pentium III (Coppermine)
Gentoo Base System version 1.4.16
Python:              dev-lang/python-2.3.4-r1 [2.3.4 (#1, Mar  7 2005, 13:37:45)]
distcc 2.16 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
dev-lang/python:     2.3.4-r1
sys-apps/sandbox:    [Not Present]
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.5, 1.8.5-r3, 1.7.9-r1, 1.6.3, 1.4_p6, 1.9.4
sys-devel/binutils:  2.15.92.0.2-r7
sys-devel/libtool:   1.5.2-r7, 1.4.3-r4
virtual/os-headers:  2.4.18, 2.4.22-r1, 2.4.19-r1
ACCEPT_KEYWORDS=&quot;x86&quot;
AUTOCLEAN=&quot;yes&quot;
CFLAGS=&quot;-march=i686 -O2 -pipe&quot;
CHOST=&quot;i686-pc-linux-gnu&quot;
CONFIG_PROTECT=&quot;/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/bind /var/qmail/control&quot;
CONFIG_PROTECT_MASK=&quot;/etc/gconf /etc/terminfo /etc/env.d&quot;
CXXFLAGS=&quot;-march=i686 -O2 -pipe&quot;
DISTDIR=&quot;/usr/portage/distfiles&quot;
FEATURES=&quot;autoaddcvs autoconfig buildpkg ccache distlocks fixpackages sandbox sfperms strict&quot;
GENTOO_MIRRORS=&quot;http://mirror.datapipe.net/gentoo ftp://ftp.gtlib.cc.gatech.edu/pub/gentoo ftp://ftp.ussg.iu.edu/pub/linux/gentoo http://open-systems.ufl.edu/mirrors/gentoo http://mirror.tucdemonic.org/gentoo/ http://gentoo.osuosl.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo&quot;
MAKEOPTS=&quot;-j3&quot;
PKGDIR=&quot;/usr/portage/packages&quot;
PORTAGE_TMPDIR=&quot;/var/tmp&quot;
PORTDIR=&quot;/usr/portage&quot;
SYNC=&quot;rsync://rsync.namerica.gentoo.org/gentoo-portage&quot;
USE=&quot;x86 alsa apache2 apm asterisk berkdb bitmap-fonts crypt curl emboss encode extensions font-server foomaticdb fortran gd gdbm gif imagemagick imlib jpeg justify libg++ libwww mikmod mmx motif mp3 mpeg mysql nagios-dns nagios-ntp nagios-ping nagios-ssh ncurses nopri nozaptel offensive ogg oggvorbis pam pcap pdflib perl pic png prelude python readline slang snmp spell sse ssl tcpd tiff truetype truetype-fonts type1-fonts vorbis xml2 xv zlib userland_GNU kernel_linux elibc_glibc&quot;
Unset:  ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>solar@gentoo.org</who>
            <bug_when>2005-05-23 08:59:15 0000</bug_when>
            <thetext>The same thing happens later on in src/log.c

escnonprint_internal (const char *str, char escape, int base)
{
  static int ringpos;                   /* current ring position */

  assert (base == 8 || base == 16);

  int nprcnt = count_nonprint (str);

-----
Solution is the same. 

escnonprint_internal (const char *str, char escape, int base)
{
  static int ringpos;                   /* current ring position */
  int nprcnt;
  assert (base == 8 || base == 16);

  nprcnt = count_nonprint (str);</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>seemant@gentoo.org</who>
            <bug_when>2005-07-18 11:16:45 0000</bug_when>
            <thetext>new patchset uploaded with these fixes in. sorry about the delay.</thetext>
          </long_desc>
      
    </bug>

</bugzilla>