Hello xss.pro community,
I have a question about compiling a C program for ESXi.
I'm trying to compile my program, but because ESXi uses a very old kernel and doesn't follow POSIX standards, the code doesn't work very well.
I tried to create a VM with centos7 with the minimum of libs to try to compile but it didn't work anyway.
I also tried compiling statically with `-static` but when I run it I get the following error
This error is being caused in this block of code, but I know that the problem is in how I am compiling since I know other programs that do the same thing and it works
I'm testing on an ESXi 7
I have a question about compiling a C program for ESXi.
I'm trying to compile my program, but because ESXi uses a very old kernel and doesn't follow POSIX standards, the code doesn't work very well.
I tried to create a VM with centos7 with the minimum of libs to try to compile but it didn't work anyway.
Код:
# Build (CentOS 7)
[root@localhost main]# gcc -D_BSD_SOURCE -std=c99 main.c
# Run in (ESXi)
[root@localhost:~] ./a.out
/out: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by ./out)
I also tried compiling statically with `-static` but when I run it I get the following error
Код:
[root@localhost:~] ./out -copy /vmfs
Failed to backup directory: /vmfs : Function not implemented
This error is being caused in this block of code, but I know that the problem is in how I am compiling since I know other programs that do the same thing and it works
C:
DIR *dir = opendir(dirname);
if (dir == NULL)
{
printf(“Failed to backup directory: %s : %s\n”, dirname, strerror(errno));
return;
}
I'm testing on an ESXi 7