Skip to content

Fix build on FreeBSD - Refactor spawn_make_environment_for_display()

Guido Falsi requested to merge (removed):FreeBSD_Build_Fix into master

On FreeBSD environ needs to be defined in the same source file where it is used.

Linux provides a nonstandard extention to avoid needing the definition.

This patch adds back code which was removed in commit 447b3194 but with #ifdef FreeBSD since it is needed only there.

Ref: https://man7.org/linux/man-pages/man7/environ.7.html https://man.freebsd.org/cgi/man.cgi?query=environ&apropos=0&sektion=0&manpath=FreeBSD+13.1-RELEASE+and+Ports&arch=default&format=html

Merge request reports