Skip to content

Application compiled with CONFIG_POSIX_API doesn't have access to POSIX headers #15627

@pfalcon

Description

@pfalcon

Turns out, when an application (e.g. a sample) has an option CONFIG_POSIX_API=y in its prj.conf, it doesn't have include/posix/ path added to its compiler include path. This is completely unexpected given the https://github.com/zephyrproject-rtos/zephyr/blob/master/lib/posix/CMakeLists.txt#L6 directive. Turns out that a few POSIX tests we have work that around by explicitly adding that include path explicitly in app's CMakeLists.txt: https://github.com/zephyrproject-rtos/zephyr/blob/master/tests/posix/common/CMakeLists.txt#L7

This is completely not adequate behavior, requiring obscure options to use Zephyr POSIX subsystem, and leaking and repeating details of internal setup into each and every POSIX app.

Metadata

Metadata

Assignees

Labels

bugThe issue is a bug, or the PR is fixing a bugpriority: mediumMedium impact/importance bug

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions