I was trying to run netcat on my 2003 Apple Powerbook. It turned out that netcat failed to connect to remote hosts. After some digging, it turned out the bug probably only shows up for specific compiler/platform combinations and is known (but unfixed) in upstream. Patch is trivial and attached. Also posted the patch upstream. Marking this as major, since netcat is unusable for me. Reproducible: Always Steps to Reproduce: 1. Start a netcat server like: netcat -l -p 12345 2. Try to connect and send some stuff: echo "foo" | netcat -n 127.0.0.1 12345 Actual Results: Nothing. Expected Results: The server should print "foo" mattias@thirtytwo ~ emerge --info Portage 2.1.2-r9 (default-linux/ppc/2005.1/ppc, gcc-3.4.6, glibc-2.5-r0, 2.6.19-gentoo-r6 ppc) ================================================================= System uname: 2.6.19-gentoo-r6 ppc 7447/7457, altivec supported Gentoo Base System version 1.12.9 Timestamp of tree: Tue, 13 Feb 2007 08:20:01 +0000 ccache version 2.4 [enabled] dev-java/java-config: 1.3.7, 2.0.31-r3 dev-lang/python: 2.3.6, 2.4.4 dev-python/pycrypto: 2.0.1-r5 dev-util/ccache: 2.4-r6 sys-apps/sandbox: 1.2.18.1 sys-devel/autoconf: 2.13, 2.61 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10 sys-devel/binutils: 2.17 sys-devel/gcc-config: 1.3.14 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.20 ACCEPT_KEYWORDS="ppc ~ppc" AUTOCLEAN="yes" CBUILD="powerpc-unknown-linux-gnu" CFLAGS="-O2 -mcpu=G4 -maltivec -mabi=altivec -pipe -fno-strict-aliasing" CHOST="powerpc-unknown-linux-gnu" CONFIG_PROTECT="/etc /usr/share/X11/xkb" CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c" CXXFLAGS="-O2 -mcpu=G4 -maltivec -mabi=altivec -pipe -fno-strict-aliasing" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig ccache distlocks metadata-transfer sandbox sfperms strict" GENTOO_MIRRORS="ftp://mirror.switch.ch/mirror/gentoo/ ftp://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/ ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ ftp://ftp.gentoo.mesh-solutions.com/gentoo/" LINGUAS="en de" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.de.gentoo.org/gentoo-portage" USE="X Xaw3d a52aac aac aalib alsa altivec apache2 audiofile avahi bcmath berkdb bitmap-fonts bluetooth bogofilter bzip2 bzlib cairo caps cdda cddb cdparanoia cdr cli cracklib crypt ctype cups daap dbus dlloader doc dri dvb dvd dvdr dvdread dvi eds emboss encode esd exif fbcon ffmpeg fftw firefox flac fortran ftp gdbm gif gkthtml glib gnome gnutls graphviz gs gstreamer gtk gtk2 guile hal iconv imlib ipv6 isdnlog jabber jack java jpeg jpeg2k lesstif libwww lua mad madwifi matroska mbox midi mikmod mime mmap mng mono motif mp3 mpeg ncurses new-login nls nptl nptlonly nsplugin ogg oggvorbis opengl pam pango pci pcmcia pcre pdf perl png ppc pppd python qt qt3 qt4 readline recode reflection ruby samba sdl session shared sharedmem sndfile sockets socks5 speex spell spl ssl svg t1lib tcpd tetex theora threads tiff truetype truetype-fonts type1-fonts udev unicode usb vcd vhosts vorbis wxwindows xanim xine xinerama xlocale xml xml2 xorg xpm xprint xv xvid zlib" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en de" USERLAND="GNU" VIDEO_CARDS="ati radeon fbdev" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Created attachment 112081 [details, diff] Proposed patch.
committed as -r1, thanks much :)