fix warnings and compile error in Apache2.4