Error expected declaration specifiers or ... before prosys
Hallo Forum,
Beim kompilieren meiner C File erhalte ich folgenden Fehler:
error: expected declaration specifiers or ‘...’ before ‘prosys’ (prosys ist ein Systemcall, welcher selbst definiert wurde)
gauss.c:7: error: expected declaration specifiers or ‘...’ before ‘prosys’
gauss.c:7: warning: data definition has no type or storage class
der Code:
[CODE]
_syscall0(long, prosys);
main(int args, char* argv)
{
printf("Berechnung nach der Gauß-Formel \n");
printf("Die Summe ist: %d \n", prosys(argv[1]));
}
[/CODE]
vielen dank!
Beim kompilieren meiner C File erhalte ich folgenden Fehler:
error: expected declaration specifiers or ‘...’ before ‘prosys’ (prosys ist ein Systemcall, welcher selbst definiert wurde)
gauss.c:7: error: expected declaration specifiers or ‘...’ before ‘prosys’
gauss.c:7: warning: data definition has no type or storage class
der Code:
[CODE]
- include <stdio.h>
- include <linux/unistd.h>
- include <errno.h>
- define __NR_prosys 320
_syscall0(long, prosys);
main(int args, char* argv)
{
printf("Berechnung nach der Gauß-Formel \n");
printf("Die Summe ist: %d \n", prosys(argv[1]));
}
[/CODE]
vielen dank!
Please also mark the comments that contributed to the solution of the article
Content-Key: 133035
Url: https://administrator.de/contentid/133035
Printed on: April 26, 2024 at 15:04 o'clock
1 Comment