nfs-kernel-server: fix segfault on x86_64/uClibc

Signed-off-by: W. Michael Petullo <mike@flyn.org>
[refresh patch]
Signed-off-by: Etienne CHAMPETIER <champetier.etienne@gmail.com>
This commit is contained in:
W. Michael Petullo 2016-06-12 15:10:21 -04:00 committed by Etienne CHAMPETIER
parent d33b2c7ef9
commit df9eb01b4d
2 changed files with 21 additions and 1 deletions

View File

@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=nfs-kernel-server
PKG_VERSION:=1.3.2
PKG_RELEASE:=2
PKG_RELEASE:=3
PKG_MD5SUM:=1e2f3c1ed468dee02d00c534c002ea10
PKG_SOURCE_URL:=@SF/nfs

View File

@ -0,0 +1,20 @@
--- a/support/export/hostname.c
+++ b/support/export/hostname.c
@@ -350,7 +350,9 @@ host_numeric_addrinfo(const struct socka
/*
* getaddrinfo(AI_NUMERICHOST) never fills in ai_canonname
+ * ...well, it does on uclibc.
*/
+#ifndef __UCLIBC__
if (ai != NULL) {
free(ai->ai_canonname); /* just in case */
ai->ai_canonname = strdup(buf);
@@ -359,6 +361,7 @@ host_numeric_addrinfo(const struct socka
ai = NULL;
}
}
+#endif
return ai;
}