300-geoip-endian-detection.patch 613 B

123456789101112131415161718
  1. --- a/extensions/libxt_geoip.c
  2. +++ b/extensions/libxt_geoip.c
  3. @@ -59,13 +59,13 @@ geoip_get_subnets(const char *code, uint
  4. /* Use simple integer vector files */
  5. if (nfproto == NFPROTO_IPV6) {
  6. -#if __BYTE_ORDER == _BIG_ENDIAN
  7. +#if BYTE_ORDER == BIG_ENDIAN
  8. snprintf(buf, sizeof(buf), GEOIP_DB_DIR "/BE/%s.iv6", code);
  9. #else
  10. snprintf(buf, sizeof(buf), GEOIP_DB_DIR "/LE/%s.iv6", code);
  11. #endif
  12. } else {
  13. -#if __BYTE_ORDER == _BIG_ENDIAN
  14. +#if BYTE_ORDER == BIG_ENDIAN
  15. snprintf(buf, sizeof(buf), GEOIP_DB_DIR "/BE/%s.iv4", code);
  16. #else
  17. snprintf(buf, sizeof(buf), GEOIP_DB_DIR "/LE/%s.iv4", code);