How to rebuild Arduino core for ESP8266
There are four variants of LwIP bundled with the ESP8266 core:


V1.4 (Compile from source)
V1.4 (Precompiled)
V2 Lower Memory
V2 Higher Bandwidth


By default (for most boards) one of the V2 variants is selected. You need to change that to the V1.4 (Compile from source) for it to use the version that you have modified.