[riot-notifications] [RIOT-OS/RIOT] Fixed AF_INET6 number to match C-library defines (#12145)
notifications at github.com
Mon Sep 2 12:01:13 CEST 2019
### Contribution description
AF_INET and AF_INET6 have POSIX-wide accepted numbers across different systems (4 and 10 respectively).
Violating this assignment may cause library calls related, e.g. to IP address handling, to fail.
This patch keeps the enum type, but assigns the right numbers to AF_INET and AF_INET6 so that libraries are not confused by the label mismatch.
### Testing procedure
Simply calling `inet_pton()` with the wrong address family on native triggers the problem.
`inet_pton()` returns '0' (error) and sets errno to 97 (EAFNOSUPPORT).
See simple test to reproduce:
### Issues/PRs references
This defect has been discovered while working on PR #10308 - but it's not related to TLS sockets.
See also: #12130 which can be blocking for the test.
You can view, comment on, or merge this pull request online at:
-- Commit Summary --
* Fixed AF_INET6 number to match C-library defines
-- File Changes --
M sys/include/net/af.h (7)
-- Patch Links --
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the notifications