postgresql: fix IPv6 detection for uclibc compile
authorPeter Seiderer <ps.report@gmx.net>
Tue, 10 Mar 2015 19:59:38 +0000 (20:59 +0100)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 15 Mar 2015 18:06:56 +0000 (19:06 +0100)
Assist configure IPv6 support detection for uclibc,
fixes the following uclibc compile failure:

auth.c: In function ‘CheckRADIUSAuth’:
auth.c:2379:24: error: ‘in6addr_any’ undeclared (first use in this function)
  localaddr.sin6_addr = in6addr_any;

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/postgresql/postgresql.mk

index 03154afe3a2aca7c4fb2390538da1f88cfa333c6..7ebf79530f622a0c27b2db3134bd018541d201e4 100644 (file)
@@ -14,6 +14,12 @@ POSTGRESQL_INSTALL_STAGING = YES
 POSTGRESQL_CONFIG_SCRIPTS = pg_config
 
 ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)
+# overwrite IPV6 detection
+ifeq ($(BR2_INET_IPV6),y)
+POSTGRESQL_CONF_ENV += ac_cv_type_struct_sockaddr_in6=yes
+else
+POSTGRESQL_CONF_ENV += ac_cv_type_struct_sockaddr_in6=no
+endif
 # PostgreSQL does not build against uClibc with locales
 # enabled, due to an uClibc bug, see
 # http://lists.uclibc.org/pipermail/uclibc/2014-April/048326.html