While building 2.5 on a debian 2.2 (potato) system I encountered a problem in socketmodule.c. The system in question has netlink.h, but a symbol (NETLINK_DNRTMSG) is not (whole module fails to build because of this). The provided patch (unified diff) fixes this by surrounding the line with an ifdef. The respective code also contains other int constants that probably should be protected, but this patch doesn't touch them.