I am building sc-im 0.8.3-2 on Arch Linux.
I have tried with the AUR package, but running make in the project as detailed in the README's installation instructions yields the same result.
There are comments on the AUR comments page for the same error, thus I believe this may be a common issue.
When I run make -C src, I get several errors related to ods.c, like the below:
formats/ods.c:97:28: error: implicit declaration of function ‘malloc’ [-Wimplicit-function-declaration]
97 | content = (char *) malloc(sb_content.size);
| ^~~~~~
formats/ods.c:58:1: note: include ‘<stdlib.h>’ or provide a declaration of ‘malloc’
57 | #include "../utils/string.h"
+++ |+#include <stdlib.h>
58 | #endif
formats/ods.c:97:28: warning: incompatible implicit declaration of built-in function ‘malloc’ [-Wbuiltin-declaration-mismatch]
97 | content = (char *) malloc(sb_content.size);
| ^~~~~~
formats/ods.c:97:28: note: include ‘<stdlib.h>’ or provide a declaration of ‘malloc’
I also receive the same error for calls to atof.
The fix for this issue was simply adding #include <stdlib.h> in src/formats/ods.c.
I am not very familiar with C build systems, so I am not certain whether this has any other impacts.
If this is an acceptable fix, I am more than happy to open a Pull Request for this, and if not I would appreciate some help in figuring out another solution.
Let me know if you need anything else from my end
Thanks!
Hello all,
I am building
sc-im 0.8.3-2
on Arch Linux. I have tried with the AUR package, but runningmake
in the project as detailed in the README's installation instructions yields the same result. There are comments on the AUR comments page for the same error, thus I believe this may be a common issue. When I runmake -C src
, I get several errors related toods.c
, like the below:I also receive the same error for calls to
atof
. The fix for this issue was simply adding#include <stdlib.h>
insrc/formats/ods.c
. I am not very familiar withC
build systems, so I am not certain whether this has any other impacts. If this is an acceptable fix, I am more than happy to open a Pull Request for this, and if not I would appreciate some help in figuring out another solution.Let me know if you need anything else from my end Thanks!