Commit 38d4fd5
committed
cmake: add -lsocket if necessary
On OpenIndiana (Illumos) the cmake build fails with indirect
symbol references to functions declared by `sys/socket.h`.
To address this, check for `getsockopt` linkage, and if it
fails try again with `-lsocket` which provides the symbols
on that operating system.
This doesn't seem to be necessary with the autotools build;
perhaps libtool is passing something extra to the linker
to have it accept the transitive dependencies.
Fixes #60
Fixes https://gitlab.xiph.org/xiph/opusfile/-/issues/23371 parent 4147f3a commit 38d4fd5
1 file changed
+8
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
106 | 113 | | |
107 | 114 | | |
108 | 115 | | |
| |||
164 | 171 | | |
165 | 172 | | |
166 | 173 | | |
| 174 | + | |
167 | 175 | | |
168 | 176 | | |
169 | 177 | | |
| |||
0 commit comments