fix: drop _XOPEN_SOURCE from pty.c to keep the BSD tty API visible - #4
Merged
Conversation
CMake already builds with gnu11 (CMAKE_C_EXTENSIONS ON), so posix_openpt is visible without _XOPEN_SOURCE. Defining it hides the BSD extensions the tty path needs (cfmakeraw, TIOCSCTTY, struct winsize) and breaks the macOS build as soon as the tty code lands. Also documents in sandbox_darwin.c that sandbox_init() is deprecated since macOS 10.8 and trips -Werror: wrap that single call in a scoped clang pragma instead of turning OMICRON_WERROR off.
Owner
|
Ahora el CI funciona para los 2 sistemas |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CMake ya se compila con gnu11 (CMAKE_C_EXTENSIONS activado), por lo que posix_openpt es visible sin necesidad de _XOPEN_SOURCE. Definirlo oculta las extensiones BSD que necesita la ruta tty (cfmakeraw, TIOCSCTTY, struct winsize) y provoca un error en la compilación para macOS en cuanto se incorpora el código tty.
Además, en sandbox_darwin.c se indica que sandbox_init() está obsoleta desde macOS 10.8 y activa -Werror: envuelve esa única llamada en un pragma de clang con ámbito específico en lugar de desactivar OMICRON_WERROR.
@levtcode toco uno de tus archivos asi q es importante q los revises.