nfs-kernel-server: fix segfault on x86_64/uClibc
authorW. Michael Petullo <mike@flyn.org>
Sun, 12 Jun 2016 19:10:21 +0000 (15:10 -0400)
committerEtienne CHAMPETIER <champetier.etienne@gmail.com>
Sat, 2 Jul 2016 23:25:00 +0000 (23:25 +0000)
Signed-off-by: W. Michael Petullo <mike@flyn.org>
[refresh patch]
Signed-off-by: Etienne CHAMPETIER <champetier.etienne@gmail.com>
net/nfs-kernel-server/Makefile
net/nfs-kernel-server/patches/200-uclibc-fix.patch [new file with mode: 0644]

index fb67bb4eaab04483351b7050aaf19059aef3f02b..7e6b403ff43429417fc6fa213ee8e8f65187a976 100644 (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
diff --git a/net/nfs-kernel-server/patches/200-uclibc-fix.patch b/net/nfs-kernel-server/patches/200-uclibc-fix.patch
new file mode 100644 (file)
index 0000000..db6b083
--- /dev/null
@@ -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;
+ }