Skip to content

Conversation

@GitHubIDforRoger
Copy link
Contributor

拉取/合并请求描述:(PR description)

问题在rt-thread\components\libc\termios中出现.

  1. 为什么PR:
    在使用libc时编译无法通过,提示错误为:pid_t未定义.

  2. 原因:
    pid_t是在sys/types.h中定义 --> termios.h文件中引用了sys/types.h --> posix_termios.h文件未引用termios.h --> 导致编译无法通过

  3. 解决办法:
    把posix_termios.c文件中的
    #include <termios.h>
    放在posix_termios.h中即可

  4. 已在stm32f103-atk-nano板上进行了测试通过

当前拉取/合并请求的状态 Intent for your PR

必须选择一项 Choose one (Mandatory):

  • 本拉取/合并请求是一个草稿版本 This PR is for a code-review and is intended to get feedback
  • 本拉取/合并请求是一个成熟版本 This PR is mature, and ready to be integrated into the repo

代码质量 Code Quality:

我在这个拉取/合并请求中已经考虑了 As part of this pull request, I've considered the following:

  • 已经仔细查看过代码改动的对比 Already check the difference between PR and old code
  • 代码风格正确,包括缩进空格,命名及其他风格 Style guide is adhered to, including spacing, naming and other style
  • 没有垃圾代码,代码尽量精简,不包含#if 0代码,不包含已经被注释了的代码 All redundant code is removed and cleaned up
  • 所有变更均有原因及合理的,并且不会影响到其他软件组件代码或BSP All modifications are justified and not affect other components or BSP
  • 对难懂代码均提供对应的注释 I've commented appropriately where code is tricky
  • 本拉取/合并请求代码是高质量的 Code in this PR is of high quality

@CLAassistant
Copy link

CLAassistant commented Mar 30, 2020

CLA assistant check
All committers have signed the CLA.


#include <termios.h>


Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why add a new line in here? And remove an empty line above?

Copy link
Contributor Author

@GitHubIDforRoger GitHubIDforRoger Mar 30, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry,这只是一个个人的书写习惯。
我现在已经重新上传,去掉了不必要的修改。

@GitHubIDforRoger GitHubIDforRoger force-pushed the posix_termios.h头文件找不到pid_t定义的bug branch from 83da45b to a3d6d47 Compare March 31, 2020 01:40
@BernardXiong BernardXiong merged commit e382ae0 into RT-Thread:master Apr 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants