2008-09-19

 

Fix for mod_bw when getting an error "undefined symbol: apr_atomic_cas"

I downloaded the Apache module mod_bw to see if I could simulate some "slow" connections. To compile the package you need to run the following command as root:
# apxs -i -a -c mod_bw.c

That will install the module correctly, but when you add the configuration option to your vhost configs you might get an error "undefined symbol: apr_atomic_cas". When that happens, open the file mod_bw.c and change the following:

Before:
/* Compatibility for ARP < 1 */
#if (APR_MAJOR_VERSION < 1)
#define apr_atomic_inc32 apr_atomic_inc
#define apr_atomic_dec32 apr_atomic_dec
#define apr_atomic_add32 apr_atomic_add
#define apr_atomic_cas32 apr_atomic_cas
#define apr_atomic_set32 apr_atomic_set
#endif


AFTER

/* Compatibility for ARP < 1 */
/*
#if (APR_MAJOR_VERSION < 1)
#define apr_atomic_inc32 apr_atomic_inc
#define apr_atomic_dec32 apr_atomic_dec
#define apr_atomic_add32 apr_atomic_add
#define apr_atomic_cas32 apr_atomic_cas
#define apr_atomic_set32 apr_atomic_set
#endif
*/






Comments:
Thank you so much this fixed my problem!
-=R
 
Good job! Worked for me too.
 
Great helpful! Thank you.
I think the mod's author should fix this issue.
 
Nice fix! Thank you!!
 
Thanks!!!!!!
 
It worked, thanks!
 
finally it worked! big thanx mate!
 
God bless you! Ty dude!!
 
Post a Comment

<< Home

This page is powered by Blogger. Isn't yours?