Build error on Arch Linux
JKAbrams opened this issue · 1 comments
JKAbrams commented
The problem is that strndup() in plugin/pluginutil.c is already defined in /usr/include/string.h:
In file included from /usr/include/string.h:634:0,
from pluginutil.c:3:
pluginutil.c:17:14: error: expected identifier or ‘(’ before ‘__extension__’
static char *strndup(const char *source, size_t maxLength) {
^
In file included from /usr/include/assert.h:35:0,
from ../common/pipe.c:27,
from pipe.c:1
Changing the function name makes it build:
sed -i 's/strndup/strndup_/' plugin/pluginutil.c
GCC-verion: 4.9.1