Skip to content

Import unistd.h before calling syscall.#1

Open
eatnumber1 wants to merge 1 commit intotwosigma:masterfrom
eatnumber1:unistd
Open

Import unistd.h before calling syscall.#1
eatnumber1 wants to merge 1 commit intotwosigma:masterfrom
eatnumber1:unistd

Conversation

@eatnumber1
Copy link

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.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant