apache / apache/nuttx

[BUG] h_errno and EAI_xxx are wrongly mixed

Open
#15,752 0 comments 0 reactions 1 assignee Claimed by @linguini1 View on GitHub
Arch: all Area: Networking Area: Posix OS: Mac Type: Bug
Dominant language
C
Stars
4k
Forks
1.7k
Avg merge
1d 17h
Merged PRs (30d)
237

Description

### Description / Steps to reproduce the issue

gethostentbyname_r can return EAI_NONAME while it's expected to return an h_errno value. (eg. HOST_NOT_FOUND)

getaddrinfo treats an error from gethostentbyname_r as an EAI_xxx while it's actually an h_errno value.

maybe someone should audit the whole netdb logic.

### On which OS does this issue occur?

[OS: Mac]

### What is the version of your OS?

macOS 15.3

### NuttX Version

master

### Issue Architecture

[Arch: all]

### Issue Area

[Area: Networking], [Area: Posix]

### Host information

_No response_

### Verification

- [x] I have verified before submitting the report.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.