The compile failure seems to be caused by the -m32
command line argument to gcc:
zyga@fyke:~$ gcc -std=c99 -Werror -Wall -static /tmp/check-6185516270145770849/1/seccomp_syscall_runner.c -o /tmp/check-6185516270145770849/1/seccomp_syscall_runner.m32 -Wl,-static -static-libgcc
zyga@fyke:~$ gcc -std=c99 -Werror -Wall -static /tmp/check-6185516270145770849/1/seccomp_syscall_runner.c -o /tmp/check-6185516270145770849/1/seccomp_syscall_runner.m32 -Wl,-static -static-libgcc -m32
In file included from /tmp/check-6185516270145770849/1/seccomp_syscall_runner.c:3:0:
/usr/include/stdlib.h:25:10: fatal error: bits/libc-header-start.h: Nie ma takiego pliku ani katalogu
#include <bits/libc-header-start.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
The program that fails to compile is:
#define _GNU_SOURCE
#include <stdlib.h>
#include <sys/syscall.h>
#include <unistd.h>
int main(int argc, char** argv)
{
int l[7];
for (int i = 0; i < 7; i++)
l[i] = atoi(argv[i + 1]);
// There might be architecture-specific requirements. see "man syscall"
// for details.
syscall(l[0], l[1], l[2], l[3], l[4], l[5], l[6]);
syscall(SYS_exit, 0, 0, 0, 0, 0, 0);
return 0;
}