void-packages/srcpkgs/nfs-utils/patches/musl-in6.patch
2019-05-15 08:14:20 +02:00

25 lines
923 B
Diff

--- a/utils/mount/network.c
+++ b/utils/mount/network.c
@@ -39,11 +39,11 @@
#include <sys/socket.h>
#include <sys/wait.h>
#include <sys/stat.h>
-#if defined(__GLIBC__) && (__GLIBC__ < 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 24)
+#if defined(__GLIBC__) && (__GLIBC__ < 2) || (defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ < 24)
/* Cannot safely include linux/in6.h in old glibc, so hardcode the needed values */
# define IPV6_PREFER_SRC_PUBLIC 2
# define IPV6_ADDR_PREFERENCES 72
-#else
+#elif defined(__GLIBC__)
# include <linux/in6.h>
#endif
#include <netinet/in.h>
@@ -1062,7 +1062,7 @@ int clnt_ping(struct sockaddr_in *saddr, const unsigned long prog,
if (caddr) {
/* Get the address of our end of this connection */
socklen_t len = sizeof(*caddr);
- if (getsockname(sock, caddr, &len) != 0)
+ if (getsockname(sock, (struct sockaddr *)caddr, &len) != 0)
caddr->sin_family = 0;
}