From: Vlad-Andrei BĂDOIU (78692) Date: Tue, 12 Nov 2019 10:12:41 +0000 (+0000) Subject: Change the restrict keyword to __restrict__ X-Git-Tag: RELEASE-0.4~14 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=bb60ccb335df44fb65d7f74e75127db438b80389;p=unikraft%2Flibs%2Fnewlib.git Change the restrict keyword to __restrict__ 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 Reviewed-by: Felipe Huici --- 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