diff --git a/mio/lib/main.c b/mio/lib/main.c index fb091d1..d93d1f4 100644 --- a/mio/lib/main.c +++ b/mio/lib/main.c @@ -751,9 +751,12 @@ int main (int argc, char* argv[]) memset (&tcp_bind, 0, MIO_SIZEOF(tcp_bind)); mio_sckaddr_initforip4 (&tcp_bind.localaddr, 1235, MIO_NULL); - tcp_bind.options = MIO_DEV_SCK_BIND_REUSEADDR | /*MIO_DEV_SCK_BIND_REUSEPORT |*/ MIO_DEV_SCK_BIND_SSL; + tcp_bind.options = MIO_DEV_SCK_BIND_REUSEADDR /*| MIO_DEV_SCK_BIND_REUSEPORT |*/; +#if defined(USE_SSL) + tcp_bind.options |= MIO_DEV_SCK_BIND_SSL; tcp_bind.ssl_certfile = "localhost.crt"; tcp_bind.ssl_keyfile = "localhost.key"; +#endif MIO_INIT_NTIME (&tcp_bind.accept_tmout, 5, 1); if (mio_dev_sck_bind(tcp[2], &tcp_bind) <= -1) diff --git a/mio/lib/mio-sck.c b/mio/lib/mio-sck.c index 37672c0..2e55059 100644 --- a/mio/lib/mio-sck.c +++ b/mio/lib/mio-sck.c @@ -1767,3 +1767,4 @@ mio_uint16_t mio_checksumip (const void* hdr, mio_oow_t len) return (mio_uint16_t)~sum; } + diff --git a/mio/lib/mio-sck.h b/mio/lib/mio-sck.h index 518b176..73b360f 100644 --- a/mio/lib/mio-sck.h +++ b/mio/lib/mio-sck.h @@ -596,7 +596,6 @@ MIO_EXPORT mio_uint16_t mio_checksumip ( mio_oow_t len ); - #ifdef __cplusplus } #endif