2010年9月3日

sysctl.h:41: error: expected ':', ',', ';', '}' or '__attribute__' before '*' token

Issue:
In file included from ./include/sys/sysctl.h:44,
from libc/sysdeps/linux/arm/ioperm.c:46:
sysctl.h:41: error: expected ':', ',', ';', '}' or '__attribute__' before '*' token
make[4]: *** [libc/sysdeps/linux/arm/ioperm.os] Error 1

Solution:
Directly edit sysctl.h from
struct __sysctl_args {
int __user *name;
int nlen;
void __user *oldval;
size_t __user *oldlenp;
void __user *newval;
size_t newlen;
unsigned long __unused[4];
};
to
struct __sysctl_args {
int __attribute__((noderef, address_space(1))) *name;
int nlen;
void __attribute__((noderef, address_space(1))) *oldval;
size_t __attribute__((noderef, address_space(1))) *oldlenp;
void __attribute__((noderef, address_space(1))) *newval;
size_t newlen;
unsigned long __unused[4];
};

0 意見: