Created attachment 210989 [details] svn(1) diff against the ports tree I intend to implement these (and a couple of others) in libc coming soon, so preemptively fix the build by guarding them behind #ifndef so that they work with both old/new. This part of the patch will likely still be desired for DragonflyBSD compatibility, even after all supported versions have grown the _unlocked variants. No PORTREVISION bump because it's a big nop until they're actually exposed by libc.
Created attachment 210992 [details] svn(1) diff against the ports tree Re-roll; just include <stdio.h> before #define'ing the _unlocked variants that will appear in stdio.h shortly, and guard fputc_unlocked on an #ifndef as that one will remain a macro since there's an appropriate inline version.
Whatever you decide is best is ok by me. You'll need a ports committer to bless the change to commit.
Comment on attachment 210992 [details] svn(1) diff against the ports tree If it passes QA: Reviewed by: koobs (ports) Approved by: koobs (ports) If you could, comment the patch header to describe the issue it fixes (this seems like a future 13/CURRENT only issue right?)
^Triage: Re-assign to to Kyle per comment 2 for resolution
(In reply to Kubilay Kocak from comment #3) It would be inappropriate to add a comment to the patch header since this is just modifying the pre-existing patch that adds a good bit of other FreeBSD configuration bits, but I'll add an inline comment near the _unlocked definitions that describes when they can just be removed. =-)
A commit references this bug: Author: kevans Date: Wed Jan 29 18:35:30 UTC 2020 New revision: 524564 URL: https://svnweb.freebsd.org/changeset/ports/524564 Log: devel/elfutils: fix future build failure w.r.t. stdio _unlocked Include <stdio.h> early so that the stdio.h function declarations come first, then redefine fputs/fwrite/fread_unlocked to the locked versions. fputc_unlocked will be a macro similar to putc_unlocked, so just hide that one behind an #ifndef since it will be provided as a macro by <stdio.h>. The other three will be using the technically-incorrect locked variants until all supported releases provide the needed functions, at which point we can switch them all at once. No PORTREVISION bump as this is just a preemptive build fix that doesn't change the output at all. QA: * portlint not ran, no change outside of a single patch * testport (-CURRENT, amd64; 12.1-RELEASE, amd64; -CURRENT+patch, amd64) PR: 243546 Reviewed by: koobs (ports) Approved by: koobs (ports), cem (maintainer) MFH: 2020Q1 (implicit, build fix) Changes: head/devel/elfutils/files/patch-lib_eu-config.h
Thanks, Conrad & Koobs!