]> The Tcpdump Group git mirrors - libpcap/commit
Use always __linux__ for code that uses Linux-specific features
authorFrancois-Xavier Le Bail <[email protected]>
Wed, 15 May 2024 17:46:26 +0000 (19:46 +0200)
committerfxlb <[email protected]>
Wed, 15 May 2024 19:19:04 +0000 (19:19 +0000)
commit8d41908f6fedf2249dabb9e6b44a1882977fe2ef
tree2492410310243312b947ea4219972b5b2f3b3793
parent0797ed7340f93618fd097ad870dfc1dde7cecc4f
Use always __linux__ for code that uses Linux-specific features

See:
https://web.archive.org/web/20231206084513/http://www.faqs.org/docs/Linux-HOWTO/GCC-HOWTO.html#INDEX.25
"Use __linux__ for this purpose, not linux. Although the latter is
 defined, it is not POSIX compliant."

In fact, linux is not always defined:
TinyCC does not define linux, but __linux__.
fad-getad.c
gencode.c
pcap-netmap.c
pcap.c
testprogs/valgrindtest.c