mpx / lua-cjson

Lua CJSON is a fast JSON encoding/parsing module for Lua

Home Page:https://kyne.au/~mark/software/lua-cjson.php

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Compilation issue: Redefinition of fpconv_init when defining USE_INTERNAL_FPCONV

arnaudfoisset opened this issue · comments

Hi,
I'm trying to compile lua-json with the USE_INTERNAL_FPCONV file and get the following compliation error:

fpconv.c:205:6: error: redefinition of ‘fpconv_init’
 void fpconv_init()
      ^~~~~~~~~~~
In file included from fpconv.c:36:0:
fpconv.h:10:20: note: previous definition of ‘fpconv_init’ was here
 static inline void fpconv_init()
                    ^~~~~~~~~~~
Makefile:90: recipe for target 'fpconv.o' failed
make[1]: *** [fpconv.o] Error 1

Indeed, fpconv_init is defined in both fpconv.c and fpconv.h.
A fix could be undefining fpconv_init() in fpconv.c under the same flag.

What do you think?