The port databases/xapian-core does not build on 9-STABLE, because the symbol SOCK_CLOEXEC is not defined. The offending file is backends/flint_lock.cc, lines 208 and 232. https://wiki.freebsd.org/AtomicCloseOnExec says that the SOCK_CLOEXEC feature is only supported since FreeBSD release 10.0.
Created attachment 177250 [details] Proposed patch The attached patch fixes the build by defining SOCK_CLOEXEC to 0 when it is not already defined (the 1.4 xapian series does basically the same thing with safesyssocket.h).
A commit references this bug: Author: rakuco Date: Mon Nov 21 21:26:59 UTC 2016 New revision: 426759 URL: https://svnweb.freebsd.org/changeset/ports/426759 Log: Unbreak the build on FreeBSD 9 after r426647. SOCK_CLOEXEC was introduced in FreeBSD 10, so define it to 0 on FreeBSD 9 (the code already handles this case). Xapian 1.4 has a safesyssocket.h that does the same thing. PR: 214699 Approved by: portmgr (antoine) Changes: head/databases/xapian-core/Makefile head/databases/xapian-core/files/extrapatch-backends_flint__lock.cc
Thank you, Raphael! I confirm I could build it successfully.