libvirtcpuid icon indicating copy to clipboard operation
libvirtcpuid copied to clipboard

Import unistd.h before calling `syscall`.

Open eatnumber1 opened this issue 3 years ago • 0 comments

The Linux man page for syscall(2) documents it as:

#define _GNU_SOURCE         /* See feature_test_macros(7) */
#include <unistd.h>
#include <sys/syscall.h>   /* For SYS_xxx definitions */

long syscall(long number, ...);

Therefore unistd.h is required in addition to the already imported sys/syscall.h and the already defined _GNU_SOURCE.

eatnumber1 avatar Jun 25 '21 17:06 eatnumber1