ASPLes / nopoll

OpenSource WebSocket toolkit
http://www.aspl.es/nopoll
GNU Lesser General Public License v2.1
124 stars 74 forks source link

Test stack protector #22

Closed softins closed 7 years ago

softins commented 7 years ago

For legacy reasons, I need to build and use the library on CentOS 4, as well as 5 and 6.

The version of GCC on CentOS 4 does not understand the stack-protector options, so this modification to configure.ac includes a test for whether those options are supported.

If ./autogen.sh and make dist are done on a CentOS 6 system, the resulting ./configure runs happily on CentOS 4 and correctly omits the stack protector options. They are of course still included properly on CentOS 5 and 6.

In addition, when building on CentOS 4, the compiler wrongly gives a warning that header_size might be used uninitialized in nopoll_conn_get_msg(). Adding an initialization suppresses that warning without changing the behaviour.

francisbrosnan commented 7 years ago

Hello Tony,

Thanks for taking your time to submit this patch. I've been checking it with different machines and it works as expected. I'm merging it,

Best Regards,

softins commented 7 years ago

Great, thanks! Tony