[asterisk-dev] ASTERISK_VERSION_NUM

Alexander Traud pabstraud at compuserve.com
Mon Nov 1 02:44:59 CDT 2021


Not at runtime but at compile-time, how does the compiler of a module detect which version is used? Before Asterisk 11, I included <asterisk/version.h> and the preprocessor macro ASTERISK_VERSION_NUM was available, see [1]. How do I solve that today?

My workaround, because I build in-tree anyway, I patched its Makefile as well: _ASTCFLAGS+=-DASTERISK_VERSION_NUM=$(ASTERISKVERSIONNUM).

[1] <https://github.com/asterisk/asterisk/commit/9ee8a74>





More information about the asterisk-dev mailing list