[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import unistd.h before calling syscall. #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Import unistd.h before calling syscall.
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.
  • Loading branch information
eatnumber1 committed Jun 25, 2021
commit a329a5493cbc3ea130120f903d55d1a9d0043faa
1 change: 1 addition & 0 deletions src/syscalls.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#ifndef __SYSCALLS_H__
#define __SYSCALLS_H__

#include <unistd.h>
#include <sys/syscall.h>

static inline int _tgkill(int tgid, int tid, int sig)
Expand Down