GithubHelp home page GithubHelp logo

Comments (9)

phhusson avatar phhusson commented on August 21, 2024

Isn't it just of setting cflags properly?

Le 15 août 2016 23:50, "Igor Kalkov" [email protected] a écrit :

Can we extract those nested methods to allow compilation inline with AOSP?

external/Superuser/Superuser/jni/su/daemon.c:506:69: error: function
definition is not allowed here
auto void cb(void *arg, int uid, const char *src, const char *dst) {

external/Superuser/Superuser/jni/su/daemon.c:545:15: error: use of
undeclared identifier 'cb'
bind_foreach(cb, NULL);

external/Superuser/Superuser/jni/su/daemon.c:549:53: error: function
definition is not allowed here
auto void cb(void *arg, int uid, const char *path) {

external/Superuser/Superuser/jni/su/daemon.c:566:15: error: use of
undeclared identifier 'cb'
init_foreach(cb, NULL);


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#51, or mute the thread
https://github.com/notifications/unsubscribe-auth/AAAOOhpDlJqpA86uRIwzVuE94X5vaxyYks5qgN8KgaJpZM4JkzqU
.

from superuser.

ikalkov avatar ikalkov commented on August 21, 2024

To be honest, I have no idea :)
Do you have a suggestion how it should be changed? I'd be happy to test it.

Until now I was using the original repo from koush. But as it seems pretty abandoned, I'd like to switch to something else for my AOSP N preview 5.

from superuser.

ikalkov avatar ikalkov commented on August 21, 2024

I've just tried this:

LOCAL_CFLAGS += -fnested-functions -z execstack -Wa,--execstack

in Superuser/jni/Android.mk, but I'm keep getting the same error message. Flags are taken from here:
http://stackoverflow.com/questions/10577613/nested-functions-on-android-ndk

from superuser.

kelvinji2009 avatar kelvinji2009 commented on August 21, 2024

@ikalkov Did you figure out how to fix this? I saw the same error. Thanks.

from superuser.

ikalkov avatar ikalkov commented on August 21, 2024

@kelvinji2009 No, but I've just found this commit: airend@3236a1c
I'll check it in the next days.

from superuser.

kelvinji2009 avatar kelvinji2009 commented on August 21, 2024

@ikalkov Thanks for your reply. The commit is just for application build but not for su binary build(ndk-build).
My dev-env:
OSX-10.11.6
NDK-r13(the latest version)

from superuser.

ikalkov avatar ikalkov commented on August 21, 2024

@kelvinji2009 I didn't test it myself yet, but the commit message is clearly about nested functions in the su binary:

Clang doesn't like nested functions, so use GCC temporarily, until
su code is fixed.

There is also a change in the Android.mk file for the su module:

  LOCAL_MODULE := su
 +LOCAL_CLANG := false

from superuser.

kelvinji2009 avatar kelvinji2009 commented on August 21, 2024

@ikalkov Yes, i have noticed it.And i have tried to modify the Superuser/jni/Android.mk as below

LOCAL_CLANG := false

But it does not work for me.

from superuser.

ikalkov avatar ikalkov commented on August 21, 2024

Hmm, there are other issues similar to this one, so I'll close it for now.

from superuser.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.