Skip to content

Conversation

@fbriere
Copy link
Collaborator

@fbriere fbriere commented Oct 19, 2022

While glibc includes a declaration of environ within unistd.h, this is not always the case for other libc instances; POSIX states that environ "must be declared by the user if it is to be used directly"¹.

This fixes a build failure on FreeBSD reported at
#305 (comment)

¹ https://pubs.opengroup.org/onlinepubs/9699919799/

While glibc includes a declaration of `environ` within `unistd.h`, this
is not always the case for other libc instances; POSIX states that
`environ` "must be declared by the user if it is to be used directly"¹.

This fixes a build failure on FreeBSD reported at
LubosD#305 (comment)

 ¹ https://pubs.opengroup.org/onlinepubs/9699919799/
@fbriere fbriere added the bug label Oct 19, 2022
@LubosD LubosD merged commit 1d9d4d8 into LubosD:master Oct 21, 2022
@fbriere fbriere deleted the fix/environ-declaration branch October 21, 2022 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants