Re: FYI: getopt in /usr/src/contrib/diff/lib/getopt.h vs. /usr/obj/usr/src/arm64.aarch64/tmp/usr/include/unistd.h : reported as incompatible with future C23 use
- Reply: Ed Maste : "Re: FYI: getopt in /usr/src/contrib/diff/lib/getopt.h vs. /usr/obj/usr/src/arm64.aarch64/tmp/usr/include/unistd.h : reported as incompatible with future C23 use"
- In reply to: Mark Millard : "FYI: getopt in /usr/src/contrib/diff/lib/getopt.h vs. /usr/obj/usr/src/arm64.aarch64/tmp/usr/include/unistd.h : reported as incompatible with future C23 use"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 18 Nov 2025 13:27:21 UTC
On Sat, 8 Nov 2025 at 11:10, Mark Millard <marklmi@yahoo.com> wrote: > > In file included from /usr/src/contrib/diff/src/diff3.c:32: > /usr/src/contrib/diff/lib/getopt.h:154:12: warning: a function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C23, conflicting with a previous declaration [-Wdeprecated-non-prototype] > 154 | extern int getopt (); > | ^ > /usr/obj/usr/src/arm64.aarch64/tmp/usr/include/unistd.h:384:6: note: conflicting prototype is here > 384 | int getopt(int, char * const [], const char *); > | ^ I think we can just remove contrib/diff/lib/getopt.h and use the system header. I've opened a review to do that in https://reviews.freebsd.org/D53802