I'm pretty sure it's because Unreal recently changed how it stores (G)Z:Lines. Can you confirm that removing glines works fine, as well as tell me your Unreal version?
-DPIC -shared -Wl,-export-dynamic -DDYNAMIC_LINKING \
-o m_rmtkl.so m_rmtkl.c
m_rmtkl.c: In function ‘m_rmtkl’:
m_rmtkl.c:338: error: ‘tklindex2’ undeclared (first use in this function)
m_rmtkl.c:338: error: (Each undeclared identifier is reported only once
m_rmtkl.c:338: error: for each function it appears in.)
m_rmtkl.c: At top level:
m_rmtkl.c:355: error: expected ‘)’ before string constant
m_rmtkl.c:356: error: expected identifier or ‘(’ before ‘return’
m_rmtkl.c:357: error: expected identifier or ‘(’ before ‘}’ token
make[4]: *** [custommodule] Error 1
make[4]: Leaving directory `/home/ircsoyl1/unrealircd-4.2.4/src/modules/third'
*****
Building 3rd party module m_rmtkl failed.
Contact the module author of the m_rmtkl module (not the UnrealIRCd team), or simply delete the /home/ircsoyl1/unrealircd-4.2.4/src/modules/third/m_rmtkl.c file
*****