Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After updating Android Studio, typedef now fail: error: unexpected type name 'read_t': expected expression #96

Open
CunningLogic opened this issue May 6, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@CunningLogic
Copy link

bytehook Version

v1.0.10

Android OS Version

12.0

Android ABIs

arm64-v8a

Device Manufacturers and Models

Google Pixel 6

Describe the Bug

Android Studio Jellyfish | 2023.3.1
Host Linux
NDK = 25.0.8775105 25.1.8937393 25.2.9519653 26.1.10909125 27.0.11718014

After upgrading Android Studio and bytehook I am now running into an error that worked previously.

typedef ssize_t (*read_t)(int, unsigned char*, size_t);

static ssize_t read_proxy_auto(int fd, unsigned char *buf, size_t count) {
    ssize_t ret = BYTEHOOK_CALL_PREV(read_proxy_auto, read_t, fd, buf, count);

    BYTEHOOK_POP_STACK();
    return ret;

}

Execution failed for task ':app:buildCMakeDebug[arm64-v8a]'.
> com.android.ide.common.process.ProcessException: ninja: Entering directory `/home/jcase/AndroidStudioProjects/Rainor/app/.cxx/Debug/6l356c5k/arm64-v8a'
  [1/2] Building CXX object CMakeFiles/chub.dir/chub.cpp.o
  FAILED: CMakeFiles/chub.dir/chub.cpp.o 
  /home/jcase/Android/Sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ --target=aarch64-none-linux-android26 --sysroot=/home/jcase/Android/Sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64/sysroot -Dchub_EXPORTS -isystem /home/jcase/.gradle/caches/transforms-4/dbcf50b851546548b06bc88378547ded/transformed/bytehook-1.0.10/prefab/modules/bytehook/include -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security   -fno-limit-debug-info  -fPIC -MD -MT CMakeFiles/chub.dir/chub.cpp.o -MF CMakeFiles/chub.dir/chub.cpp.o.d -o CMakeFiles/chub.dir/chub.cpp.o -c /home/jcase/AndroidStudioProjects/Rainor/app/src/main/cpp/chub.cpp
  /home/jcase/AndroidStudioProjects/Rainor/app/src/main/cpp/chub.cpp:38:55: error: unexpected type name 'read_t': expected expression
      ssize_t ret = BYTEHOOK_CALL_PREV(read_proxy_auto, read_t, fd, buf, count);
                                                        ^
  1 error generated.
  ninja: build stopped: subcommand failed.
@CunningLogic CunningLogic added the bug Something isn't working label May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant