2022-01-08 10:07:04 -05:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <string.h>
|
2020-08-08 07:39:31 -04:00
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/stat.h>
|
2022-01-08 10:07:04 -05:00
|
|
|
#include <sys/utsname.h>
|
2020-08-08 07:39:31 -04:00
|
|
|
|
|
|
|
int main(int argc, char **argv)
|
|
|
|
{
|
|
|
|
if (argc != 2)
|
|
|
|
{
|
|
|
|
return 1;
|
|
|
|
}
|
2022-01-08 10:07:04 -05:00
|
|
|
|
|
|
|
if (argv[1][0] == '-' && argv[1][1] == '6')
|
|
|
|
{
|
|
|
|
struct utsname buf;
|
|
|
|
if (0 == uname(&buf))
|
|
|
|
{
|
|
|
|
if (strstr(buf.machine, "amd64"))
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (strstr(buf.machine, "x86_64"))
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
2020-08-08 07:39:31 -04:00
|
|
|
return chmod(argv[1], 0777);
|
|
|
|
}
|
|
|
|
|