diff options
| author | David M. Syzdek <david@syzdek.net> | 2022-01-21 22:28:39 -0900 |
|---|---|---|
| committer | David M. Syzdek <david@syzdek.net> | 2022-01-21 22:28:39 -0900 |
| commit | 87892393e85024bd3636862434ed4a2632e050b9 (patch) | |
| tree | 5a631c67e5eee1d17715d9702828b9081d7cf61a | |
| parent | e8a284abcdaa6f966b7e6044f2978061767d0499 (diff) | |
| download | tinyrad-87892393e85024bd3636862434ed4a2632e050b9.tar.gz tinyrad-87892393e85024bd3636862434ed4a2632e050b9.tar.bz2 tinyrad-87892393e85024bd3636862434ed4a2632e050b9.tar.xz tinyrad-87892393e85024bd3636862434ed4a2632e050b9.zip | |
examples: wrapping SO_NOSIGPIPE in ifdef endif
| -rw-r--r-- | examples/socket-example.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/examples/socket-example.c b/examples/socket-example.c index 09e1d11..040a57e 100644 --- a/examples/socket-example.c +++ b/examples/socket-example.c | |||
| @@ -291,7 +291,9 @@ int main(int argc, char * argv[]) | |||
| 291 | 291 | ||
| 292 | // configures socket | 292 | // configures socket |
| 293 | my_verbose(opts, "configuring socket ..."); | 293 | my_verbose(opts, "configuring socket ..."); |
| 294 | #ifdef SO_NOSIGPIPE | ||
| 294 | opt = 1; setsockopt(s, SOL_SOCKET, SO_NOSIGPIPE, (void *)&opt, sizeof(int)); | 295 | opt = 1; setsockopt(s, SOL_SOCKET, SO_NOSIGPIPE, (void *)&opt, sizeof(int)); |
| 296 | #endif | ||
| 295 | opt = 1; setsockopt(s, SOL_SOCKET, SO_REUSEADDR, (void *)&opt, sizeof(int)); | 297 | opt = 1; setsockopt(s, SOL_SOCKET, SO_REUSEADDR, (void *)&opt, sizeof(int)); |
| 296 | opt = 1; setsockopt(s, SOL_SOCKET, SO_REUSEPORT, (void *)&opt, sizeof(int)); | 298 | opt = 1; setsockopt(s, SOL_SOCKET, SO_REUSEPORT, (void *)&opt, sizeof(int)); |
| 297 | opt = 1; | 299 | opt = 1; |
