On 64-bit centos, I want to use bw_mod to limit apache bandwidth. after the installation is complete and apache is restarted, undefined appears.
I am on 64-bit centos and want to useBw_modLimit apache bandwidth. after the installation is complete, the undefined symbol: apr_atomic_cas error is displayed after apache is restarted, for example:
The solution is as follows:
1. open the mod_bw.c file vim mod_bw.c
2. find the following code:
# 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
Annotate it, that is:
/*
# 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
*/
3. recompile.