[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Minios-devel] [UNIKRAFT/NEWLIB PATCH 1/1] Change the restrict keyword to __restrict__
Thanks Vlad. Reviewed-by: Felipe Huici <felipe.huici@xxxxxxxxx> On 12.11.19, 11:12, "Vlad-Andrei BĂDOIU (78692)" <vlad_andrei.badoiu@xxxxxxxxxxxxxxx> wrote: The restrict keyword doesn't exist in C++. Including headers that use this keyword causes compilation errors. We replace the keyword with the __restrict__ extension from GCC. Signed-off-by: Vlad-Andrei Badoiu <vlad_andrei.badoiu@xxxxxxxxxxxxxxx> --- include/dirent.h | 4 ++-- include/sys/statvfs.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/dirent.h b/include/dirent.h index 8532930..e86be2a 100644 --- a/include/dirent.h +++ b/include/dirent.h @@ -66,8 +66,8 @@ int closedir(DIR *dirp); DIR *fdopendir(int fd); DIR *opendir(const char *name); struct dirent *readdir(DIR *dirp); -int readdir_r(DIR *restrict dirp, struct dirent *restrict entry, - struct dirent **restrict result); +int readdir_r(DIR *__restrict__ dirp, struct dirent *__restrict__ entry, + struct dirent **__restrict__ result); void rewinddir(DIR *dirp); int dirfd(DIR *dirp); diff --git a/include/sys/statvfs.h b/include/sys/statvfs.h index 96ef851..8e71ac8 100644 --- a/include/sys/statvfs.h +++ b/include/sys/statvfs.h @@ -59,7 +59,7 @@ struct statvfs { int __reserved[6]; }; -int statvfs(const char *restrict path, struct statvfs *restrict buf); +int statvfs(const char *__restrict__ path, struct statvfs *__restrict__ buf); int fstatvfs(int fd, struct statvfs *buf); #define ST_RDONLY 1 -- 2.20.1 _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/minios-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |