Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3315464
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T22:21:12+00:00 2026-05-17T22:21:12+00:00

still working on this system call!!! i have added a system call to a

  • 0

still working on this system call!!!

i have added a system call to a kernel, compiled and the OS is running off it.

now i am getting syntax error on the compilation of my test application.

testmycall.h

#include<linux/unistd.h>

#define __NR_mycall 244

_syscall1(long, mycall, int, i)

testmycall.c

#include<stdio.h>

#include "testmycall.h"

int main(int argc, char *argv[])

{

    printf("%d\n", mycall(15));

}

here is the error

stef@ubuntu:~$ gcc -o testmycall testmycall.c
In file included from testmycall.c:3:
testmycall.h:7: error: expected ‘)’ before ‘mycall’
stef@ubuntu:~$ gcc -o testmycall testmycall.c
In file included from testmycall.c:3:
testmycall.h:7: error: expected declaration specifiers or ‘...’ before ‘mycall’
testmycall.h:7: error: expected declaration specifiers or ‘...’ before ‘i’
testmycall.c: In function ‘_syscall1’:
testmycall.c:7: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
testmycall.h:7: error: parameter name omitted
testmycall.h:7: error: parameter name omitted
testmycall.c:11: error: expected ‘{’ at end of input
stef@ubuntu

i have added in the syscall instead of _syscall1

now i get this error

stef@ubuntu:~$ gcc -o testmycall testmycall.c
testmycall.c: In function ‘syscall’:
testmycall.c:7: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
testmycall.c:11: error: expected ‘{’ 

this is the app, any ideas why???

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T22:21:13+00:00Added an answer on May 17, 2026 at 10:21 pm

    The _syscall macros are obsolete and should not be used, instead use syscall, eg.

    #define _GNU_SOURCE
    #include <unistd.h>
    ...
    
    printf("%d\n", syscall(__NR_mycall, 15));
    

    Here’s my test program:

    #define _GNU_SOURCE
    #include <stdio.h>
    #include <unistd.h>
    
    #define __NR_mycall 244
    
    int main(int argc, char **argv)
    {
        printf("%d\n", syscall(__NR_mycall,15));
        return 0;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm still working with this huge list of URLs, all the help I have
I still very new using Subversion. Is it possible to have a working copy
I'm getting this error: Cannot use a DependencyObject that belongs to a different thread
Why is this not working ? StreamReader m = new StreamReader(../folder1/email.html, System.Text.Encoding.UTF8); code file
I've had this working before, but now it's not working and I've been tearing
I have followed the suggestions from this post to try and get Distinct() working
I'm working on an AJAX login system. Right now, when the user clicks on
I'm still working on groking the F# thing - trying to work out how
I'm still working on a particular RDF file, but seems that something is not
I'm a little lost (still working with Ron Jeffries's book). Here's a simple class:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.