Repository navigation
system/nxinit: include termios.h for TIOCSCTTY - #4301
Open
JianyuWang0623 wants to merge 1 commit into
Open
JianyuWang0623 wants to merge 1 commit into
JianyuWang0623 wants to merge 1 commit into
Conversation
TIOCSCTTY is declared in nuttx/serial/tioctl.h and service.c only gets it transitively through sys/ioctl.h. Include termios.h explicitly so the dependency does not rely on how fs/ioctl.h is organized. Co-authored-by: multica-agent <github@multica.ai> Assisted-by: OpenCode:mimo-v2.6-pro Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
JianyuWang0623
marked this pull request as ready for review
December 6, 2026 14:04
xiaoxiang781216
approved these changes
Dec 6, 2026
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.
Summary
Add an explicit
#include <termios.h>tosystem/nxinit/service.c.TIOCSCTTYis defined innuttx/serial/tioctl.h, andservice.cgetsit today only transitively through
sys/ioctl.h. The explicit includemakes the dependency immune to header reorganization.
Impact
No behavior change: the same
TIOCSCTTYdefinition is picked up; theinclude is only made explicit.
Testing
Build Host: Ubuntu 22.04 (gcc, the host toolchain for the sim target)
Target: sim:watchdog (CONFIG_SYSTEM_NXINIT=y)
ninja exits 0 and
apps/system/nxinit/CMakeFiles/apps_init.dir/service.c.ois produced; the sim binary boots to the
nsh>prompt (./nuttx, exit 0):