zephyr/include/net
Paul Sokolovsky 958e826b69 net: socket: Workaround issue with recent GCC and fcntl macro
If we have CONFIG_NET_SOCKETS_POSIX_NAMES enabled (which is now
default), and also have CONFIG_NEWLIB_LIBC enabled, latest versions
of GCC throw a strange error like:

error: conflicting types for 'zsock_fcntl'
  692 | #define fcntl zsock_fcntl

After enough consideration, it seems that when Newlib is used, its
fcntl.h header is used, which declares fcntl() with POSIX prototype:
"int fcntl(int fd, int cmd, ...)". It seems that recent GCC, when
seeing the #define like above, checks that its right-hand side
(zsock_fcntl(int, int, int) above) is compatible with an existing
LHS prototype. That doesn't make sense from the point of view of
the C preprocessor semantics, and yet that's what apparently happens.

Make GCC happy by defining an inline wrapper function with
signature compatible with POSIX fcntl prototype, and use it in
the define, instead of zsock_fcntl directly.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2021-04-14 11:10:16 -05:00
..
bt.h
buf.h net: buf: Simplify querying maximum len 2021-02-22 19:33:16 +02:00
can.h
capture.h net: doc: Add net_capture API documentation 2021-04-07 12:12:30 -04:00
coap_link_format.h
coap.h net: coap: acknowledgement initialization helper 2021-02-15 10:17:11 +02:00
dhcpv4.h
dns_resolve.h net: dns: update to new k_work API 2021-03-15 17:19:54 +02:00
dns_sd.h net: dns: dns-sd: support dns service discovery 2020-11-09 16:15:02 -08:00
dsa.h net: Conversion of k_work API 2021-04-14 07:07:40 -04:00
dummy.h
ethernet_mgmt.h
ethernet_vlan.h
ethernet.h net: l2: ethernet: fix k_work API usage in carrier on/off handling 2021-03-23 16:18:29 +02:00
gptp.h doc: fix @param usage in callbacks 2020-12-18 12:18:28 +01:00
hostname.h net: hostname: define public macro representing maximum hostname length 2020-11-17 19:21:43 -05:00
http_client.h net: http: add numeric http status code to response struct 2021-04-14 18:46:47 +03:00
http_parser_state.h license: add missing SPDX headers 2021-02-11 08:05:16 -05:00
http_parser_url.h license: add missing SPDX headers 2021-02-11 08:05:16 -05:00
http_parser.h license: add missing SPDX headers 2021-02-11 08:05:16 -05:00
ieee802154_mgmt.h net: ieee802154: remove duplicate definition 2021-04-07 14:15:29 +02:00
ieee802154_radio.h drivers: ieee802154: cc13xx_cc26xx: sub-ghz support 2020-11-09 10:25:24 +02:00
ieee802154.h
ipv4_autoconf.h
lldp.h
lwm2m_path.h net: lwm2m: Add path generation macro 2020-11-10 14:10:44 +02:00
lwm2m.h net: Conversion of k_work API 2021-04-14 07:07:40 -04:00
mii.h
mqtt.h net: mqtt: Return -1 if keepalive messages are disabled. 2020-12-08 14:08:36 -05:00
net_config.h drivers: device: do not reuse tag name 'device' 2021-03-22 19:48:14 -04:00
net_conn_mgr.h
net_context.h net: socket: Implement SO_BINDTODEVICE socket option 2021-04-02 07:23:17 -04:00
net_core.h net: mqtt: log struct mqtt_utf8 with hexdump 2021-03-05 12:49:22 +02:00
net_event.h
net_if.h net: if: Add locking when setting/getting hoplimit or ttl 2021-03-29 07:40:24 -04:00
net_ip.h net: virtual: ipip: Add IP tunneling driver 2021-03-29 07:40:24 -04:00
net_l2.h net: capture: Catch sent and received packets 2021-04-02 07:24:06 -04:00
net_linkaddr.h
net_mgmt.h doc: fix @param usage in callbacks 2020-12-18 12:18:28 +01:00
net_offload.h kernel: Remove CONFIG_LEGACY_TIMEOUT_API 2021-01-14 21:33:16 -05:00
net_pkt.h net: pkt: Add helper to store capture bit 2021-04-02 07:24:06 -04:00
net_stats.h net: stats: Separate dropped TCP data segments and TCP packets 2020-11-06 09:50:02 -06:00
net_timeout.h net: timeout: refactor to fix multiple problems 2021-01-07 11:14:38 +02:00
openthread.h openthread: add openthread_api_mutex_try_lock() 2020-10-20 16:39:22 +03:00
ppp.h net: Conversion of k_work API 2021-04-14 07:07:40 -04:00
promiscuous.h
ptp_time.h
sntp.h
socket_can.h
socket_net_mgmt.h
socket_offload.h
socket_select.h net: include: Add missing brace to socket_select.h 2021-01-20 12:01:27 +02:00
socket_types.h net: socket: Implement SO_RCVTIMEO timeout option 2021-01-19 17:11:25 -05:00
socket.h net: socket: Workaround issue with recent GCC and fcntl macro 2021-04-14 11:10:16 -05:00
socketutils.h
tftp.h
tls_credentials.h
trickle.h net: Conversion of k_work API 2021-04-14 07:07:40 -04:00
udp.h
virtual_mgmt.h net: virtual: Add virtual network interface support 2021-03-29 07:40:24 -04:00
virtual.h net: l2: ipip: Add capability bit for IPIP tunnel 2021-04-02 07:24:06 -04:00
websocket.h doc: fix @param usage in callbacks 2020-12-18 12:18:28 +01:00
wifi_mgmt.h
wifi.h