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

Compiling error #65

Open
hqt opened this issue Dec 28, 2016 · 4 comments
Open

Compiling error #65

hqt opened this issue Dec 28, 2016 · 4 comments

Comments

@hqt
Copy link

hqt commented Dec 28, 2016

When I compile, I meet this error:

[x86] Compile        : su <= su.c
[x86] Compile        : su <= daemon.c
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) {
                                                                           ^
jni/su/daemon.c:545:15: error: use of undeclared identifier 'cb'
        bind_foreach(cb, NULL);
                     ^
jni/su/daemon.c:549:53: error: function definition is not allowed here
        auto void cb(void *arg, int uid, const char *path) {
                                                           ^
jni/su/daemon.c:566:15: error: use of undeclared identifier 'cb'
        init_foreach(cb, NULL);
                     ^
4 errors generated.
make: *** [obj/local/x86/objs/su/su/daemon.o] Error 1

Do you have idea about this.

@craigacgomez
Copy link

Please read through the README carefully as well as other issues here before creating new issues. The solution to you problem is mentioned in the project README....

"Make sure the SDK Platform for API 19 is installed, through the Android SDK Manager. Install NDK Revision 9b from here or use the latest and set NDK_TOOLCHAIN_VERSION=4.9."

@Thrilleratplay
Copy link

@cj360 opened #64 not to long ago with the problem. I think this has to do with CLang compiling issues.

@hqt Try cherry-picking this commit and see if that fixes the error.

@chaoskagami
Copy link

I'll go ahead and confirm when attempting to build this with Omni, it is indeed the use of clang that's triggering the error. I can only assume clang adheres more strictly to standards - nested functions are undefined behavior. I suggest ditching them.

@KOLANICH
Copy link

KOLANICH commented Jul 27, 2017

It can be fixed. In fact I have fixed that with some modifications (c++11 lambdas, more explicit type conversions and some additional curly braces for new context to make compiler happy about goto), but the code is still shit (lot of similar boilerplate code, mallocs, and huge codebase noone will read) and needs a serious refactoring. Maybe it even should be corroded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants