Created attachment 210990 [details]
svn(1) diff against the ports tree
A future change to FreeBSD's libc will provide this, so no need to use the locked variant. Preemptively fix the build so it works for both old/new by detecting whether fflush_unlocked is already defined or not.
The patch will still be needed for DragonflyBSD compatibility, but the __FreeBSD__ part of this can be removed later once all supported versions provide fflush_unlocked.
No PORTREVISION bump because this change is a nop until the libc implementation is committed.
The status quo is fine for now- will reopen later after new versions make their way into stable branches, since the current definition will just leave fflush_unlocked unused.