Check for sys/sockio.h.

This commit is contained in:
Fredrik Skogman 2016-09-09 06:48:24 +08:00 committed by Andy Green
parent 723b3f16fa
commit 9de43fc9d7
3 changed files with 18 additions and 0 deletions

View file

@ -474,6 +474,7 @@ CHECK_INCLUDE_FILE(strings.h LWS_HAVE_STRINGS_H)
CHECK_INCLUDE_FILE(string.h LWS_HAVE_STRING_H)
CHECK_INCLUDE_FILE(sys/prctl.h LWS_HAVE_SYS_PRCTL_H)
CHECK_INCLUDE_FILE(sys/socket.h LWS_HAVE_SYS_SOCKET_H)
CHECK_INCLUDE_FILE(sys/sockio.h LWS_HAVE_SYS_SOCKIO_H)
CHECK_INCLUDE_FILE(sys/stat.h LWS_HAVE_SYS_STAT_H)
CHECK_INCLUDE_FILE(sys/types.h LWS_HAVE_SYS_TYPES_H)
CHECK_INCLUDE_FILE(unistd.h LWS_HAVE_UNISTD_H)

View file

@ -100,6 +100,20 @@ compiled in, use
$ cmake .. -DCMAKE_BUILD_TYPE=DEBUG
```
**NOTE6**
To build on Solaris the linker needs to be informed to use lib socket
and libnsl, and only builds in 64bit mode.
```bash
$ cmake .. -DCMAKE_C_FLAGS=-m64 -DCMAKE_EXE_LINKER_FLAGS="-lsocket -lnsl"
```
4. Finally you can build using the generated Makefile:
```bash
$ make
```
@section cmq Quirk of cmake
When changing cmake options, for some reason the only way to get it to see the

View file

@ -75,6 +75,9 @@
/* Define to 1 if you have the <sys/socket.h> header file. */
#cmakedefine LWS_HAVE_SYS_SOCKET_H
/* Define to 1 if you have the <sys/sockio.h> header file. */
#cmakedefine LWS_HAVE_SYS_SOCKIO_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#cmakedefine LWS_HAVE_SYS_STAT_H