Compiling res_fax_spandsp.so

hi,
i am running asterisk 1.8.6 on a soho-router (asus rt n16, based on tomatousb) and it works great.
all i am missing is fax capability, so i need res_fax_spandsp.so.
can someone help me to compile it? i have downloaded res_fax_spandsp.c, gcc is available, spandsp-sources have been downloaded as well.
but how to continue?

gcc res_fax_spandsp.c is not working, i receive these error messages:

root@Asus:/opt/tmp/res_fax_spandsp# gcc res_fax_spandsp.c In file included from asterisk.h:27, from res_fax_spandsp.c:51: asterisk/compat.h:77:1: warning: "LLONG_MAX" redefined In file included from asterisk/compat.h:33, from asterisk.h:27, from res_fax_spandsp.c:51: /opt/include/limits.h:134:1: warning: this is the location of the previous definition res_fax_spandsp.c:101: error: 'AST_FAX_TECH_GATEWAY' undeclared here (not in a function) res_fax_spandsp.c: In function 't38_tx_packet_handler': res_fax_spandsp.c:210: error: 'AST_FAX_FRFLAG_GATEWAY' undeclared (first use in this function) res_fax_spandsp.c:210: error: (Each undeclared identifier is reported only once res_fax_spandsp.c:210: error: for each function it appears in.) res_fax_spandsp.c: In function 't30_phase_e_handler': res_fax_spandsp.c:354: error: 'AST_MODULE' undeclared (first use in this function) res_fax_spandsp.c: In function 'spandsp_fax_read': res_fax_spandsp.c:547: error: 'union ast_frame_subclass' has no member named 'format' res_fax_spandsp.c:554: error: 'AST_MODULE' undeclared (first use in this function) res_fax_spandsp.c: In function 'spandsp_fax_gw_t30_gen': res_fax_spandsp.c:622: error: 'AST_FAX_FRFLAG_GATEWAY' undeclared (first use in this function) res_fax_spandsp.c:627: error: 'union ast_frame_subclass' has no member named 'format' res_fax_spandsp.c: In function 'spandsp_fax_gateway_process': res_fax_spandsp.c:767: error: 'union ast_frame_subclass' has no member named 'format' res_fax_spandsp.c: At top level: res_fax_spandsp.c:1027: error: 'AST_MODULE' undeclared here (not in a function)

kind regards,
astrakid

I moved my answer here viewtopic.php?t=75261#p171627 because there it is more on topic.

thanks for your feedback, didn’t see it until now because i git no information about it.
in the meantime i was able to compile everything i need, just got other problems due to missing “lrounf”-function.

everything else works fine, i guess if this issue is solved i will get a big step ahead… :wink:

maybe you can help me once again (see post from me viewtopic.php?f=1&t=81851)

regards,
astrakid