Skip to content

Commit

Permalink
Check for sys/sockio.h.
Browse files Browse the repository at this point in the history
  • Loading branch information
kommendorkapten authored and lws-team committed Sep 8, 2016
1 parent 723b3f1 commit 9de43fc
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
14 changes: 14 additions & 0 deletions README.build.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions lws_config_private.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 9de43fc

Please sign in to comment.