Can't compile on CentOS 7
zuzkie opened this issue · 1 comments
Helllo,
I've tried to compile Father on CentOS 7 4.4.241-1.el7.elrepo.x86_64. but I got an error message below. I can compile it on Debian 10 4.4.241-1.el7.elrepo.x86_64. It would be great if we can use it on CentOs, as well. Thx!
$ make
gcc -Wall -ldl -o rk.so -fPIC -shared -D_GNU_SOURCE father.c
father.c:128:51: error: conflicting types for ‘restrict’
int (*o_lstat)(const char *restrict, struct stat *restrict);
^
father.c:128:28: note: previous definition of ‘restrict’ was here
int (*o_lstat)(const char *restrict, struct stat *restrict);
^
father.c:129:32: error: expected ‘;’, ‘,’ or ‘)’ before ‘path’
int lstat(const char *restrict path, struct stat *restrict buf) {
Older versions of GCC do not support the restrict keyword. I'm planning on leaving this out as it's of minimal importance for a proof of concept. Without that it should compile fine on older versions.