Bug 293394 - devel/indi: fix build with libc++ 21
Summary: devel/indi: fix build with libc++ 21
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Jose Alonso Cardenas Marquez
URL:
Keywords:
Depends on:
Blocks: 292067
  Show dependency treegraph
 
Reported: 2026-02-23 21:24 UTC by Dimitry Andric
Modified: 2026-02-25 21:05 UTC (History)
0 users

See Also:
acm: maintainer-feedback+


Attachments
devel/indi: fix build with libc++ 21 (2.34 KB, patch)
2026-02-23 21:25 UTC, Dimitry Andric
acm: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dimitry Andric freebsd_committer freebsd_triage 2026-02-23 21:24:22 UTC
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.
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2026-02-23 21:25:20 UTC
Created attachment 268308 [details]
devel/indi: fix build with libc++ 21
Comment 2 Jose Alonso Cardenas Marquez freebsd_committer freebsd_triage 2026-02-24 03:06:06 UTC
Approved! Thanks!
Comment 3 commit-hook freebsd_committer freebsd_triage 2026-02-25 19:26:03 UTC
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(+)
Comment 4 commit-hook freebsd_committer freebsd_triage 2026-02-25 19:27:04 UTC
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(+)