Page 1 of 1
Nagios 4.0.8: lib/runcmd.c doesn't compile
Posted: Tue Aug 19, 2014 4:33 pm
by jwoods
In line 590 of lib/runcmd.c, the following statement is trying to assign -1:
Code: Select all
if (asprintf(&env_string, "%s=%s", name, value) = -1) return -1;
It really should read:
Code: Select all
if (asprintf(&env_string, "%s=%s", name, value) == -1) return -1;
Re: Nagios 4.0.8: lib/runcmd.c doesn't compile
Posted: Tue Aug 19, 2014 4:36 pm
by tmcdonald
Thanks, passed this on to the devs.
Re: Nagios 4.0.8: lib/runcmd.c doesn't compile
Posted: Wed Aug 20, 2014 10:08 am
by emislivec
Thanks for the report jwoods!
What OS / compiler are you working with? Can you post or PM your config.log?
Mea culpa on this one. I had undefined HAVE_SETENV to force that code path in earlier development, but obviously not when/after adding in the error checking. I'll fix this and look at forcing the tests to use the !defined(HAVE_SETENV) path as well.
Have you come across any other problems compiling/installing?