compile: $ gcc -s -O3 -D_GNU_SOURCE -fPIC -shared -ldl -o hlds_20040707fix.so hlds_20040707fix.c copy the .so to your hlds_l/ directory and add this line to the script hlds_run right under the existing export line export LD_PRELOAD="$(pwd)/nowon.so $(pwd)/hlds_20040707fix.so"