Compile fails in: In file included from rcv.h:43, from fio.c:41: def.h:112:1: warning: "offsetof" redefined In file included from /usr/include/unistd.h:227, from def.h:56, from rcv.h:43, from fio.c:41: /usr/lib/gcc/i686-pc-linux-gnu/4.4.4/include/stddef.h:411:1: warning: this is the location of the previous definition fio.c:150:35: error: macro "offsetof" requires 2 arguments, but only 1 given Reproducible: Always Steps to Reproduce: 1. ebuild mailx Actual Results: Compile fails in: -------------------- In file included from rcv.h:43, from fio.c:41: def.h:112:1: warning: "offsetof" redefined In file included from /usr/include/unistd.h:227, from def.h:56, from rcv.h:43, from fio.c:41: /usr/lib/gcc/i686-pc-linux-gnu/4.4.4/include/stddef.h:411:1: warning: this is the location of the previous definition fio.c:150:35: error: macro "offsetof" requires 2 arguments, but only 1 given Expected Results: source should compile Portage 2.2.0_alpha2 (default/linux/x86/10.0/desktop, gcc-4.4.4, glibc-2.12.1-r1, 2.6.35.2-r1 i686) ================================================================= System uname: Linux-2.6.35.2-r1-i686-AMD_Athlon-tm-_XP_3000+-with-gentoo-1.12.11.1 Timestamp of tree: Thu, 28 Oct 2010 12:00:01 +0000 distcc 3.1 i686-pc-linux-gnu [disabled] app-shells/bash: 4.1_p7 dev-java/java-config: 2.1.11-r1 dev-lang/python: 2.6.6-r1, 2.7, 3.1.2-r4 dev-util/cmake: 2.8.1-r2 sys-apps/baselayout: 1.12.11.1 sys-apps/sandbox: 2.3-r1 sys-devel/autoconf: 2.13::<unknown repository>, 2.65-r1 sys-devel/automake: 1.4_p6::<unknown repository>, 1.5::<unknown repository>, 1.6.3::<unknown repository>, 1.7.9-r1::<unknown repository>, 1.8.5-r3::<unknown repository>, 1.9.6-r2::<unknown repository>, 1.10.3, 1.11.1 sys-devel/binutils: 2.20.1-r1 sys-devel/gcc: 4.4.4-r2 sys-devel/gcc-config: 1.4.1 sys-devel/libtool: 2.2.10 sys-devel/make: 3.81-r2 virtual/os-headers: 2.6.35 (sys-kernel/linux-headers) Repositories: gentoo local-overlay ACCEPT_KEYWORDS="x86" ACCEPT_LICENSE="* -@EULA dlj-1.1 sun-bcla-java-vm" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=athlon-xp -O2 -fomit-frame-pointer -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/X11/xkb /var/bind" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/portage /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-march=athlon-xp -O2 -fomit-frame-pointer -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="assume-digests binpkg-logs distlocks fixlafiles fixpackages news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch" GENTOO_MIRRORS="ftp://ftp.netspace.net.au/pub/gentoo/ http://mirror.internode.on.net/pub/gentoo/ http://mirror.exetel.com.au/pub/gentoo/" LANG="en_AU.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LINGUAS="en" MAKEOPTS="-j1" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/portage-overlay" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="3dnow 3dnowext bzip2 cpudetection crypt cups dbus gif gpm hal jpeg logrotate mmx mmxext nptl nptlonly pam pcre png readline samba sse ssl tcpd threads threadsafe truetype x86 xml zlib" ALSA_CARDS="via82xx" ALSA_PCM_PLUGINS="*" APACHE2_MODULES="authz_host dir mime" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" PHP_TARGETS="php5-2" RUBY_TARGETS="ruby18" SANE_BACKENDS="snapscan" USERLAND="GNU" VIDEO_CARDS="radeon fbdev" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
I have encountered exactly the same error. In "def.h" there is a define for "offsetof", the name of which is obviously part of the ANSI C standard library :/ Renaming every occurence of offsetof to my_offsetof does the trick. Actually this is done in r2, so I don't see any reason why r1 is stable (not working) and r2 isn't.
I just saw that this is actually a very old bug, see #310493
*** This bug has been marked as a duplicate of bug 310493 ***
=
*** This bug has been marked as a duplicate of bug 255753 ***