#ifndef GEOIPH_H #define GEOIPH_H #include #include #include "config.h" #include "die.h" #if defined(HAVE_GEOIP) && defined(HAVE_LIBZ) extern void init_geoip(int enforce); extern void update_geoip(void); extern int geoip_working(void); extern const char *geoip4_city_name(struct sockaddr_in sa); extern const char *geoip6_city_name(struct sockaddr_in6 sa); extern const char *geoip4_region_name(struct sockaddr_in sa); extern const char *geoip6_region_name(struct sockaddr_in6 sa); extern const char *geoip4_country_name(struct sockaddr_in sa); extern const char *geoip6_country_name(struct sockaddr_in6 sa); extern float geoip4_longitude(struct sockaddr_in sa); extern float geoip4_latitude(struct sockaddr_in sa); extern float geoip6_longitude(struct sockaddr_in6 sa); extern float geoip6_latitude(struct sockaddr_in6 sa); extern const char *geoip4_as_name(struct sockaddr_in sa); extern const char *geoip6_as_name(struct sockaddr_in6 sa); extern void destroy_geoip(void); #else static inline void init_geoip(int enforce) { } static inline void destroy_geoip(void) { } static inline void update_geoip(void) { panic("No built-in geoip support!\n"); } static inline int geoip_working(void) { return 0; } static inline const char *geoip4_city_name(struct sockaddr_in sa) { return NULL; } static inline const char *geoip6_city_name(struct sockaddr_in6 sa) { return NULL; } static inline const char *geoip4_region_name(struct sockaddr_in sa) { return NULL; } static inline const char *geoip6_region_name(struct sockaddr_in6 sa) { return NULL; } static inline const char *geoip4_country_name(struct sockaddr_in sa) { return NULL; } static inline const char *geoip6_country_name(struct sockaddr_in6 sa) { return NULL; } static inline float geoip4_longitude(struct sockaddr_in sa) { return .0f; } static inline float geoip4_latitude(struct sockaddr_in sa) { return .0f; } static inline float geoip6_longitude(struct sockaddr_in6 sa) { return .0f; } static inline float geoip6_latitude(struct sockaddr_in6 sa) { return .0f; } static inline const char *geoip4_as_name(struct sockaddr_in sa) { return NULL; } static inline const char *geoip6_as_name(struct sockaddr_in6 sa) { return NULL; } #endif #endif /* GEOIPH_H */ /'>
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2016-09-05 15:28:36 +0200
committerThomas Gleixner <tglx@linutronix.de>2016-09-05 15:32:58 +0200
commit3c1627e999e45e292d5d7ea3751ed86a6383ee2c (patch)
treeecd2a59d95cb06b211d9a2f046bdbf880e2ebca0
parent01b41159066531cc8d664362ff0cd89dd137bbfa (diff)
cpu/hotplug: Replace anon union
Some compilers are unhappy with the anon union in the state array. Replace it with a named union. While at it align the state array initializers proper and add the missing name tags. Fixes: cf392d10b69e "cpu/hotplug: Add multi instance support" Reported-by: Ingo Molnar <mingo@kernel.org> Reported-by: Fenguang Wu <fengguang.wu@intel.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: rt@linutronix.de