]> xenbits.xensource.com Git - unikraft/libs/newlib.git/commitdiff
Change the restrict keyword to __restrict__
authorVlad-Andrei BĂDOIU (78692) <vlad_andrei.badoiu@stud.acs.upb.ro>
Tue, 12 Nov 2019 10:12:41 +0000 (10:12 +0000)
committerFelipe Huici <felipe.huici@neclab.eu>
Tue, 19 Nov 2019 12:05:25 +0000 (13:05 +0100)
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@stud.acs.upb.ro>
Reviewed-by: Felipe Huici <felipe.huici@neclab.eu>
include/dirent.h
include/sys/statvfs.h

index 85329304337f42e07efcceb0e09d74f1331687bd..e86be2a694770b7326391146f4a869d730f98de4 100644 (file)
@@ -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);
 
index 96ef8513c6c2e5562e8817aff6cf7f495e16ef75..8e71ac891e846858e14885177a4ecb6807af441b 100644 (file)
@@ -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