[collectd] cpu.c is actually gnu99 :)

Michael Shigorin mike at altlinux.org
Sat Jul 1 09:32:16 CEST 2017


On Fri, Jun 30, 2017 at 11:58:10PM +0300, Michael Shigorin wrote:
> stumbled upon this lcc error when building collectd for e2k arch:
> 
>   CC       cpufreq.lo
> lcc: "cpu.c", line 443: error: expected an expression
>                 gauge_t rates[static COLLECTD_CPU_STATE_MAX])
>                               ^
[...]
> lcc developers suggested an explicit -std=c99

-std=gnu99, even; -std=c99 resulted in:

configure:17682: checking if strtok_r needs _REENTRANT
configure:17716: gcc -o conftest -pipe -Wall -g -O2 -lpthread -lgobject-2.0
-std=c99 -Wall -Werror -D_REENTRANT=1   conftest.c -ldl  >&5
lcc: "conftest.c", line 162: error: function "strtok_r" declared implicitly
          [-Werror=implicit-function-declaration]
          while ((token = strtok_r (dummy, ",", &saveptr)) != NULL)
                          ^

-- 
 ---- WBR, Michael Shigorin / http://altlinux.org
  ------ http://opennet.ru / http://anna-news.info



More information about the collectd mailing list