Skip to content

includes: guard environ declaration against macro definition#453

Merged
mkj merged 1 commit into
mkj:masterfrom
FelipeMdeO:guard-environ-declaration
Jun 23, 2026
Merged

includes: guard environ declaration against macro definition#453
mkj merged 1 commit into
mkj:masterfrom
FelipeMdeO:guard-environ-declaration

Conversation

@FelipeMdeO

Copy link
Copy Markdown
Contributor

Some platforms provide environ as a macro (e.g. NuttX in stdlib.h), where the unconditional declaration fails to compile. unistd.h is already included and prototypes environ on POSIX, so guard the fallback with #ifndef environ.

Some platforms provide environ as a macro (e.g. NuttX in stdlib.h),
where the unconditional declaration fails to compile. unistd.h is
already included and prototypes environ on POSIX, so guard the fallback
with #ifndef environ.
@mkj mkj merged commit 54ef47a into mkj:master Jun 23, 2026
18 checks passed
@mkj

mkj commented Jun 23, 2026

Copy link
Copy Markdown
Owner

Thanks. environ is such a hack!

@FelipeMdeO FelipeMdeO deleted the guard-environ-declaration branch June 23, 2026 15:35
FelipeMdeO added a commit to FelipeMdeO/nuttx-apps that referenced this pull request Jun 23, 2026
Generate default_options_guard.h at build time instead of committing a
copy, inline the NuttX options into localoptions.h (dropping the
nuttx_localoptions.h wrapper), and use upstream compat.c usershell
functions instead of custom stubs. Bump the pinned Dropbear commit to
54ef47a now that the environ guard is upstream (mkj/dropbear#453) and
drop that hunk from patch 0001.

Signed-off-by: Felipe Moura <moura.fmo@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants