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.
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
andmake 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 innopoll_conn_get_msg()
. Adding an initialization suppresses that warning without changing the behaviour.