New code from lwip project

lwip repo:
bada7e0 mem.h: fixed constants to be unsinged to fix compiler warning