]> git.ipfire.org Git - thirdparty/ulogd2.git/commitdiff
ip2bin: fix plugin link for some compiler
authorEric Leblond <eric@regit.org>
Sun, 2 Jul 2017 15:57:54 +0000 (17:57 +0200)
committerEric Leblond <eric@regit.org>
Sun, 2 Jul 2017 16:02:56 +0000 (18:02 +0200)
Declaring a function inline and building with -O0 was causing the
following message:
 undefined symbol: uint32_to_ipv6
By declaring the function as static we fix the problem.

filter/ulogd_filter_IP2BIN.c

index e47eeaf411414a9bbeebf65835d4831d8db70671..2172d93506d514718e2c43cfbfc2ca61736331d8 100644 (file)
@@ -120,7 +120,7 @@ static char ipbin_array[MAX_KEY-START_KEY][IPADDR_LENGTH];
  * Convert IPv4 address (as 32-bit unsigned integer) to IPv6 address:
  * add 96 bits prefix "::ffff:" to get IPv6 address "::ffff:a.b.c.d".
  */
-inline void uint32_to_ipv6(const uint32_t ipv4, struct in6_addr *ipv6)
+static inline void uint32_to_ipv6(const uint32_t ipv4, struct in6_addr *ipv6)
 {
        ipv6->s6_addr32[0] = 0x00000000;
        ipv6->s6_addr32[1] = 0x00000000;