diff options
author | van Hauser <vh@thc.org> | 2021-04-16 13:53:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-16 13:53:08 +0200 |
commit | 400ab10cfdfdb25235bf0483bc0fa0332ae11461 (patch) | |
tree | c5f5c705b502109917f722ed79549e281f5a02c3 /include/android-ashmem.h | |
parent | 98989f1088d04dd4c0d21834c38b7683f1cfb42d (diff) | |
parent | 5dad04867461e93cefd1ecee6d336fa4d9ef632d (diff) | |
download | afl++-400ab10cfdfdb25235bf0483bc0fa0332ae11461.tar.gz |
Merge branch 'dev' into dev
Diffstat (limited to 'include/android-ashmem.h')
-rw-r--r-- | include/android-ashmem.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/include/android-ashmem.h b/include/android-ashmem.h index 44fe556a..1bfd3220 100644 --- a/include/android-ashmem.h +++ b/include/android-ashmem.h @@ -13,12 +13,14 @@ #include <stdio.h> #define ASHMEM_DEVICE "/dev/ashmem" -int shmdt(const void* address) { -#if defined(SYS_shmdt) +int shmdt(const void *address) { + + #if defined(SYS_shmdt) return syscall(SYS_shmdt, address); -#else + #else return syscall(SYS_ipc, SHMDT, 0, 0, 0, address, 0); -#endif + #endif + } int shmctl(int __shmid, int __cmd, struct shmid_ds *__buf) { @@ -26,7 +28,7 @@ int shmctl(int __shmid, int __cmd, struct shmid_ds *__buf) { int ret = 0; if (__cmd == IPC_RMID) { - int length = ioctl(__shmid, ASHMEM_GET_SIZE, NULL); + int length = ioctl(__shmid, ASHMEM_GET_SIZE, NULL); struct ashmem_pin pin = {0, length}; ret = ioctl(__shmid, ASHMEM_UNPIN, &pin); close(__shmid); @@ -77,6 +79,6 @@ void *shmat(int __shmid, const void *__shmaddr, int __shmflg) { } - #endif /* !_ANDROID_ASHMEM_H */ -#endif /* !__ANDROID__ */ + #endif /* !_ANDROID_ASHMEM_H */ +#endif /* !__ANDROID__ */ |