Skip to content
Commit f4e08b00 authored by Gil Pitney's avatar Gil Pitney Committed by Anas Nashif
Browse files

net: sockets: Define POSIX function symbols as inline functions



Previously, POSIX function names were aliased to zsock_ function
names using, for example:

	#define connect zsock_connect

This caused the C preprocessor to replace any symbol named 'connect',
whether a function or not, in all source code which included socket.h,
with 'zsock_connect'.  This generated unintended code where the symbol
'connect' was used as the name of a structure field (as in mqtt.h).

This new inline definition is applied to all the POSIX function symbols,
with the exception of fcntl, a redefinition of which would conflict
with the definiton in the toolchain's fcntl.h.

Fixes #5817

Signed-off-by: default avatarGil Pitney <gil.pitney@linaro.org>
parent d1675bf3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment