Seems you want to compile the program directly on the router. You should cross compile via toolchain.

I have tried and this works. Please check the source code. You need to put the package in your openwrt in your Linux machine and compile this package.

I compile a binary but I have no idea of how it work. Pls check by your own.