planetbeing / xpwn

A cross-platform custom NOR firmware loader and custom IPSW generator for the iPhone

Home Page:http://planetbeing.lighthouseapp.com/projects/15246-xpwn

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Implicit declaration failure

Numbski opened this issue · comments

[ 73%] Built target xpwn
Scanning dependencies of target xpwntool
[ 75%] Building C object ipsw-patch/CMakeFiles/xpwntool.dir/xpwntool.c.o
/Users/tshadwick/futurerestore/xpwn/ipsw-patch/xpwntool.c:124:4: error: implicit declaration of function 'exploit24kpwn' is invalid in C99
      [-Werror,-Wimplicit-function-declaration]
                        exploit24kpwn(newFile);
                        ^
1 error generated.
make[2]: *** [ipsw-patch/CMakeFiles/xpwntool.dir/xpwntool.c.o] Error 1
make[1]: *** [ipsw-patch/CMakeFiles/xpwntool.dir/all] Error 2
make: *** [all] Error 2

Sorry for being so thin on details there. Was short on time. This is attempting to build on x64 MacOS 10.15/darwin. Sadly my ability to parse this is somewhat limited - but it seems like exploit24kpwn() needs to have a prototype or a prior declaration. It seems very unlikely given the age of this code that this is a new issue - so it is really puzzling.

commented

Hey @Numbski I encountered the same issue.
I fixed it by adding #include "xpwn/img3.h" to xpwntool.c below the #include "xpwn/libxpwn.h"

Not sure if it's the intended fix, but atleast it compiles.

@planetbeing Thanks so much for merging #15. The fix works so you should be able to close this issue!