utils: Use the more low-level __NR_ prefix to refer to the syscall number
authorTobias Brunner <tobias@strongswan.org>
Tue, 17 Nov 2015 16:21:36 +0000 (17:21 +0100)
committerTobias Brunner <tobias@strongswan.org>
Tue, 17 Nov 2015 16:21:36 +0000 (17:21 +0100)
The __NR_ constants are also defined in the Android headers.

src/libstrongswan/utils/utils.c

index 47d72ee..4e86165 100644 (file)
@@ -167,7 +167,7 @@ void closefrom(int low_fd)
        dir_fd = open("/proc/self/fd", O_RDONLY);
        if (dir_fd != -1)
        {
-               while ((len = syscall(SYS_getdents64, dir_fd, buffer,
+               while ((len = syscall(__NR_getdents64, dir_fd, buffer,
                                                          sizeof(buffer))) > 0)
                {
                        for (offset = 0; offset < len; offset += entry->d_reclen)