With libc++ 21 devel/indi fails to build, with errors similar to: /wrkdirs/usr/ports/devel/indi/work/indi-2.1.7/drivers/auxiliary/gemini_flatpanel_adapters.cpp:242:14: error: use of undeclared identifier 'atoi' 242 | int id = atoi(id_str); | ^~~~ /wrkdirs/usr/ports/devel/indi/work/indi-2.1.7/drivers/auxiliary/gemini_flatpanel_adapters.cpp:341:14: error: use of undeclared identifier 'atoi' 341 | *value = atoi(value_str); | ^~~~ /wrkdirs/usr/ports/devel/indi/work/indi-2.1.7/drivers/auxiliary/gemini_flatpanel_adapters.cpp:658:14: error: use of undeclared identifier 'atoi' 658 | int id = atoi(id_str); | ^~~~ /wrkdirs/usr/ports/devel/indi/work/indi-2.1.7/drivers/auxiliary/gemini_flatpanel_adapters.cpp:793:14: error: use of undeclared identifier 'atoi' 793 | *value = atoi(value_str); | ^~~~ /wrkdirs/usr/ports/devel/indi/work/indi-2.1.7/drivers/auxiliary/gemini_flatpanel_adapters.cpp:1154:14: error: use of undeclared identifier 'atoi' 1154 | *value = atoi(value_str); | ^~~~ This is because `atoi` is declared in `<cstdlib>`, and before libc++ 21 that header got transitively included via other standard headers, but that is no longer the case. Include `<cstdlib>` explicitly to fix the errors.
Created attachment 268308 [details] devel/indi: fix build with libc++ 21
Approved! Thanks!
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=300d6785c97c4fe8e9ee682248c4269723905ac7 commit 300d6785c97c4fe8e9ee682248c4269723905ac7 Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2026-02-23 21:24:47 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2026-02-25 19:25:10 +0000 devel/indi: fix build with libc++ 21 With libc++ 21 devel/indi fails to build, with errors similar to: /wrkdirs/usr/ports/devel/indi/work/indi-2.1.7/drivers/auxiliary/gemini_flatpanel_adapters.cpp:242:14: error: use of undeclared identifier 'atoi' 242 | int id = atoi(id_str); | ^~~~ /wrkdirs/usr/ports/devel/indi/work/indi-2.1.7/drivers/auxiliary/gemini_flatpanel_adapters.cpp:341:14: error: use of undeclared identifier 'atoi' 341 | *value = atoi(value_str); | ^~~~ /wrkdirs/usr/ports/devel/indi/work/indi-2.1.7/drivers/auxiliary/gemini_flatpanel_adapters.cpp:658:14: error: use of undeclared identifier 'atoi' 658 | int id = atoi(id_str); | ^~~~ /wrkdirs/usr/ports/devel/indi/work/indi-2.1.7/drivers/auxiliary/gemini_flatpanel_adapters.cpp:793:14: error: use of undeclared identifier 'atoi' 793 | *value = atoi(value_str); | ^~~~ /wrkdirs/usr/ports/devel/indi/work/indi-2.1.7/drivers/auxiliary/gemini_flatpanel_adapters.cpp:1154:14: error: use of undeclared identifier 'atoi' 1154 | *value = atoi(value_str); | ^~~~ This is because `atoi` is declared in `<cstdlib>`, and before libc++ 21 that header got transitively included via other standard headers, but that is no longer the case. Include `<cstdlib>` explicitly to fix the errors. PR: 293394 Approved by: acm (maintainer) MFH: 2026Q1 ...tch-drivers_auxiliary_gemini__flatpanel__adapters.cpp (new) | 10 ++++++++++ 1 file changed, 10 insertions(+)
A commit in branch 2026Q1 references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=0ce0b7b0f6128c484d53bfe70d84444d7e5c35e0 commit 0ce0b7b0f6128c484d53bfe70d84444d7e5c35e0 Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2026-02-23 21:24:47 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2026-02-25 19:26:05 +0000 devel/indi: fix build with libc++ 21 With libc++ 21 devel/indi fails to build, with errors similar to: /wrkdirs/usr/ports/devel/indi/work/indi-2.1.7/drivers/auxiliary/gemini_flatpanel_adapters.cpp:242:14: error: use of undeclared identifier 'atoi' 242 | int id = atoi(id_str); | ^~~~ /wrkdirs/usr/ports/devel/indi/work/indi-2.1.7/drivers/auxiliary/gemini_flatpanel_adapters.cpp:341:14: error: use of undeclared identifier 'atoi' 341 | *value = atoi(value_str); | ^~~~ /wrkdirs/usr/ports/devel/indi/work/indi-2.1.7/drivers/auxiliary/gemini_flatpanel_adapters.cpp:658:14: error: use of undeclared identifier 'atoi' 658 | int id = atoi(id_str); | ^~~~ /wrkdirs/usr/ports/devel/indi/work/indi-2.1.7/drivers/auxiliary/gemini_flatpanel_adapters.cpp:793:14: error: use of undeclared identifier 'atoi' 793 | *value = atoi(value_str); | ^~~~ /wrkdirs/usr/ports/devel/indi/work/indi-2.1.7/drivers/auxiliary/gemini_flatpanel_adapters.cpp:1154:14: error: use of undeclared identifier 'atoi' 1154 | *value = atoi(value_str); | ^~~~ This is because `atoi` is declared in `<cstdlib>`, and before libc++ 21 that header got transitively included via other standard headers, but that is no longer the case. Include `<cstdlib>` explicitly to fix the errors. PR: 293394 Approved by: acm (maintainer) MFH: 2026Q1 (cherry picked from commit 300d6785c97c4fe8e9ee682248c4269723905ac7) ...tch-drivers_auxiliary_gemini__flatpanel__adapters.cpp (new) | 10 ++++++++++ 1 file changed, 10 insertions(+)