forked from mpx/lua-cjson
-
Notifications
You must be signed in to change notification settings - Fork 132
Open
Description
Observed behaviour
When lua-cjson is built with luarocks, the build fails if the option USE_INTERNAL_FPCONV is provided in the rockspec file.
The error message reads as follows:
fpconv.c:205:6: error: redefinition of 'fpconv_init'
void fpconv_init(void)
^~~~~~~~~~~
In file included from fpconv.c:36:
fpconv.h:19:20: note: previous definition of 'fpconv_init' was here
static inline void fpconv_init()
^~~~~~~~~~~
Error: Build error: Failed compiling object fpconv.o
Steps to reproduce
- Download the source
- Alter the .rockspec file in line 54 by adding the "USE_INTERNAL_FPCONV" option
- Run the
luarocks makecommand in the source directory
Platform information
luarocks 3.12.2
Lua 5.4.8
OS: Microsoft Windows 11 Pro
OS Version: 10.0.26100 Build 26100
Hardware: x64
As the fpconv_init() function is defined with the keywords static inline if USE_INTERNAL_FPCONV is defined in fpconv.h, I think the definition of the function in fpconv.c shall be enclosed in an #ifndef USE_INTERNAL_FPCONV block.
Metadata
Metadata
Assignees
Labels
No labels