Plaristote / segvcatch

Automatically exported from code.google.com/p/segvcatch

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Compiler can't find syscall() on Ubuntu

pernoctador opened this issue · comments

$ cmake .
$ make
Scanning dependencies of target segvcatch
[ 25%] Building CXX object lib/CMakeFiles/segvcatch.dir/segvcatch.cpp.o
In file included from /home/name/segvcatch-master/lib/segvcatch.cpp:27:0:
/home/name/segvcatch-master/lib/segvcatch.cpp: In function ‘void segvcatch::init_segv(segvcatch::handler)’:
/home/name/segvcatch-master/lib/x86_64-signal.h:144:61: error: ‘syscall’ was not declared in this scope
syscall(SYS_rt_sigaction, SIGSEGV, &act, NULL, _NSIG / 8);
^
/home/name/segvcatch-master/lib/segvcatch.cpp:127:5: note: in expansion of macro ‘INIT_SEGV’
INIT_SEGV;
^
/home/name/segvcatch-master/lib/segvcatch.cpp: In function ‘void segvcatch::init_fpe(segvcatch::handler)’:
/home/name/segvcatch-master/lib/x86_64-signal.h:156:60: error: ‘syscall’ was not declared in this scope
syscall(SYS_rt_sigaction, SIGFPE, &act, NULL, _NSIG / 8);
^
/home/name/segvcatch-master/lib/segvcatch.cpp:142:5: note: in expansion of macro ‘INIT_FPE’
INIT_FPE;
^
/home/name/segvcatch-master/lib/x86_64-signal.h: At global scope:
/home/name/segvcatch-master/lib/x86_64-signal.h:133:6: warning: ‘void {anonymous}::restore_rt()’ declared ‘static’ but never defined [-Wunused-function]
void restore_rt (void) asm ("__restore_rt")
^

It's been fixed in afe79c4. Thank you for reporting the issue !