Try emerge'ing x11-apps/xinit-1.3.0-r2 on Gentoo/FreeBSD. You'll get the following error. CC xinit.o i686-gentoo-freebsd8.0-gcc -std=gnu99 -DHAVE_CONFIG_H -I. -DXINITDIR=\"/etc/X11/xinit\" -DBINDIR=\"/usr/bin\" -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -fno-strict-aliasing -Wbad-function-cast -Wformat=2 -Wold-style-definition -Wdeclaration-after-statement -D_THREAD_SAFE -DCSRG_BASED -O2 -pipe -march=prescott --param l1-cache-size=16 --param l1-cache-line-size=64 -mtune=prescott -c xinit.c xinit.c: In function 'startServer': xinit.c:447: warning: implicit declaration of function 'setpriority' xinit.c:447: warning: nested extern declaration of 'setpriority' xinit.c:447: error: 'PRIO_PROCESS' undeclared (first use in this function) xinit.c:447: error: (Each undeclared identifier is reported only once xinit.c:447: error: for each function it appears in.) gmake[2]: *** [xinit.o] Error 1 getpriority(2) tell us that we need to include <sys/time.h> and <sys/resource.h> for setpriority() and PRIO_PROCESS on FreeBSD. Maybe xinit doesn't do so. Reproducible: Always Portage 2.2.0_alpha19 (default/bsd/fbsd/x86/8.0, gcc-4.4.4, freebsd-lib-8.0-r0, 8.0-RELEASE i386) ================================================================= System uname: FreeBSD-8.0-RELEASE-i386-32bit-ELF Timestamp of tree: Tue, 25 Jan 2011 09:00:23 +0000 app-shells/bash: 4.1_p9 dev-java/java-config: 2.1.9-r1 dev-lang/python: 2.5.4-r4, 2.6.6-r1, 2.7.1, 3.1.2-r4 dev-util/cmake: 2.8.3-r1 sys-apps/baselayout: 2.0.1-r1 sys-apps/openrc: 0.7.0 sys-apps/sandbox: 1.6-r2 sys-devel/autoconf: 2.13, 2.68 sys-devel/automake: 1.9.6-r2, 1.10.3, 1.11.1 sys-devel/binutils: 2.20.1-r1 sys-devel/gcc: 4.4.4-r2, 4.5.2 sys-devel/gcc-config: 1.4.1 sys-devel/libtool: 2.4-r1 sys-devel/make: 3.82 virtual/os-headers: 8.0 (sys-freebsd/freebsd-lib) Repositories: gentoo gentoo-bsd sunrise gentoo-haskell naota pc_local ACCEPT_KEYWORDS="x86-fbsd ~x86-fbsd" ACCEPT_LICENSE="* -@EULA sun-bcla-java-vm skype-eula" CBUILD="i686-gentoo-freebsd8.0" CFLAGS="-O2 -pipe -march=prescott --param l1-cache-size=16 --param l1-cache-line-size=64 -mtune=prescott" CHOST="i686-gentoo-freebsd8.0" CONFIG_PROTECT="/etc /usr/share/openvpn/easy-rsa" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-O2 -pipe -march=prescott --param l1-cache-size=16 --param l1-cache-line-size=64 -mtune=prescott" DISTDIR="/usr/portage/distfiles" FEATURES="assume-digests binpkg-logs chflags distlocks fixlafiles fixpackages news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch" FFLAGS="" GENTOO_MIRRORS="http://distfiles.gentoo.org" LANG="ja_JP.UTF-8" LC_ALL="ja_JP.UTF-8" LDFLAGS="" LINGUAS="ja" 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="/usr/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/var/lib/layman/gentoo-bsd /var/lib/layman/sunrise /var/lib/layman/haskell /home/naota/src/portage-overlay /usr/local/portage/pc_local" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X acl acpi berkdb bzip2 cjk cli cracklib crypt cxx dri emacs fortran gdbm gif gtk gzip-el iconv ipv6 java5 java6 jpeg jpeg2k mmx modules ncurses nls nptlonly openal opengl oss pam pcre perl png python readline session source spell sse sse2 ssl svg tcpd toolkit-scroll-bars truetype ulaw unicode usb x86-fbsd xft xorg zlib" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="FreeBSD" 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" KERNEL="FreeBSD" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="ja" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="BSD" VIDEO_CARDS="intel vga" 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, INSTALL_MASK, MAKEOPTS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Created attachment 261811 [details, diff] proposed patch I was able to build the package with this patch.
Found this: http://www.mail-archive.com/xorg-devel@lists.x.org/msg14325.html Then i think better write as this: -#ifdef __DragonFly__ +#if defined(__DragonFly__) || defined(__FreeBSD__) || defined(__OpenBSD__)
x11 team, I'd like to apply the above patch in a week. Any comments?
(In reply to comment #3) > x11 team, > > I'd like to apply the above patch in a week. Any comments? What is upstream status of this?
(In reply to comment #4) > (In reply to comment #3) > > x11 team, > > > > I'd like to apply the above patch in a week. Any comments? > > What is upstream status of this? Not yet applied. The mail above seems to be missed or ignored. http://cgit.freedesktop.org/xorg/app/xinit/log/xinit.c But I believe this patch does not affect to Linux.
I've reported bug to the upstream. https://bugs.freedesktop.org/show_bug.cgi?id=40632 and dropped ~x86-fbsd untill this bug get fixed.
Upstream applied this change to solve this bug http://cgit.freedesktop.org/xorg/app/xinit/commit/xinit.c?id=45cc81cd7abafe61bddb3ddce9f4fb8a9aa06c12 https://bugs.freedesktop.org/show_bug.cgi?id=40632 Please apply or confirm the patch.
(In reply to comment #7) > Upstream applied this change to solve this bug > http://cgit.freedesktop.org/xorg/app/xinit/commit/xinit.c?id=45cc81cd7abafe61bddb3ddce9f4fb8a9aa06c12 > https://bugs.freedesktop.org/show_bug.cgi?id=40632 > > Please apply or confirm the patch. Go for it. Backporting patches from upstream is ok.
Added in CVS. Thanks.