Where Does One Get the "Sys/Socket.H" Header/Source File

where is socket header in linux

In case you have installed manual pages, the first stop should be man socket.

Without manual pages you could call

find /usr/include -name socket.h

which outputs

/usr/include/asm/socket.h
/usr/include/sys/socket.h
/usr/include/bits/socket.h
/usr/include/linux/socket.h

on my system, the one to include is sys/socket.h .

Also see the Single UNIX Specification.

sys/socket.h is not found for gcc arm x86_64-aarch64 cross compiling

As user253751 and Ian Abbott answered in comments, there are no header files because there is no operating system which defines "socket" entity.



Related Topics



Leave a reply



Submit