summaryrefslogtreecommitdiff
path: root/package/nfs-utils/patches
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2014-05-18 09:28:59 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2014-05-18 09:29:30 +0200
commitc68b9e5076094d60e8f767ffcd3bb9c224fc3fe9 (patch)
treef3d2b986be5a8f0c5039658fc21e420488c07e5d /package/nfs-utils/patches
parent60bc3658b3ef53082c17817690ab0c6bf7f25e26 (diff)
fix musl compile, patches from AlpineLinux
Diffstat (limited to 'package/nfs-utils/patches')
-rw-r--r--package/nfs-utils/patches/patch-configure_ac26
-rw-r--r--package/nfs-utils/patches/patch-support_export_hostname_c65
-rw-r--r--package/nfs-utils/patches/patch-support_include_conffile_h20
-rw-r--r--package/nfs-utils/patches/patch-support_include_exportfs_h23
-rw-r--r--package/nfs-utils/patches/patch-support_include_sockaddr_h10
-rw-r--r--package/nfs-utils/patches/patch-support_nfs_conffile_c42
-rw-r--r--package/nfs-utils/patches/patch-support_nfs_svc_create_c11
-rw-r--r--package/nfs-utils/patches/patch-support_nfs_svc_socket_c17
-rw-r--r--package/nfs-utils/patches/patch-utils_exportfs_exportfs_c13
-rw-r--r--package/nfs-utils/patches/patch-utils_mountd_cache_c22
-rw-r--r--package/nfs-utils/patches/patch-utils_mountd_v4root_c11
-rw-r--r--package/nfs-utils/patches/patch-utils_nfsstat_nfsstat_c11
-rw-r--r--package/nfs-utils/patches/patch-utils_statd_hostname_c29
-rw-r--r--package/nfs-utils/patches/patch-utils_statd_rmtcall_c13
-rw-r--r--package/nfs-utils/patches/patch-utils_statd_sm-notify_c38
-rw-r--r--package/nfs-utils/patches/patch-utils_statd_statd_h11
16 files changed, 362 insertions, 0 deletions
diff --git a/package/nfs-utils/patches/patch-configure_ac b/package/nfs-utils/patches/patch-configure_ac
new file mode 100644
index 000000000..e21eb4210
--- /dev/null
+++ b/package/nfs-utils/patches/patch-configure_ac
@@ -0,0 +1,26 @@
+--- nfs-utils-1.3.0.orig/configure.ac 2014-03-25 16:12:07.000000000 +0100
++++ nfs-utils-1.3.0/configure.ac 2014-05-17 21:03:27.077197789 +0200
+@@ -247,9 +247,6 @@ AC_CHECK_FUNC([connect], ,
+ AC_CHECK_FUNC([getaddrinfo], ,
+ [AC_MSG_ERROR([Function 'getaddrinfo' not found.])])
+
+-AC_CHECK_FUNC([getrpcbynumber], ,
+- [AC_MSG_ERROR([Function 'getrpcbynumber' not found.])])
+-
+ AC_CHECK_FUNC([getservbyname], ,
+ [AC_MSG_ERROR([Function 'getservbyname' not found.])])
+
+@@ -408,12 +405,11 @@ AC_FUNC_STAT
+ AC_FUNC_VPRINTF
+ AC_CHECK_FUNCS([alarm atexit dup2 fdatasync ftruncate getcwd \
+ gethostbyaddr gethostbyname gethostname getmntent \
+- getnameinfo getrpcbyname getifaddrs \
++ getnameinfo getrpcbyname getrpcbynumber getrpcbynumber_r getifaddrs \
+ gettimeofday hasmntopt inet_ntoa innetgr memset mkdir pathconf \
+ ppoll realpath rmdir select socket strcasecmp strchr strdup \
+ strerror strrchr strtol strtoul sigprocmask])
+
+-
+ dnl *************************************************************
+ dnl Check for data sizes
+ dnl *************************************************************
diff --git a/package/nfs-utils/patches/patch-support_export_hostname_c b/package/nfs-utils/patches/patch-support_export_hostname_c
new file mode 100644
index 000000000..56aa13139
--- /dev/null
+++ b/package/nfs-utils/patches/patch-support_export_hostname_c
@@ -0,0 +1,65 @@
+--- nfs-utils-1.3.0.orig/support/export/hostname.c 2014-03-25 16:12:07.000000000 +0100
++++ nfs-utils-1.3.0/support/export/hostname.c 2014-05-17 21:47:07.085632108 +0200
+@@ -91,7 +91,7 @@ host_ntop(const struct sockaddr *sap, ch
+ * Returns address info structure, or NULL if an error occurs. Caller
+ * must free the returned structure with freeaddrinfo(3).
+ */
+-__attribute_malloc__
++__attribute__((__malloc__))
+ struct addrinfo *
+ host_pton(const char *paddr)
+ {
+@@ -153,7 +153,7 @@ host_pton(const char *paddr)
+ * if no information is available for @hostname. Caller must free the
+ * returned structure with freeaddrinfo(3).
+ */
+-__attribute_malloc__
++__attribute__((__malloc__))
+ struct addrinfo *
+ host_addrinfo(const char *hostname)
+ {
+@@ -199,7 +199,7 @@ host_addrinfo(const char *hostname)
+ * the string.
+ */
+ #ifdef HAVE_GETNAMEINFO
+-__attribute_malloc__
++__attribute__((__malloc__))
+ char *
+ host_canonname(const struct sockaddr *sap)
+ {
+@@ -234,7 +234,7 @@ host_canonname(const struct sockaddr *sa
+ return strdup(buf);
+ }
+ #else /* !HAVE_GETNAMEINFO */
+-__attribute_malloc__
++__attribute__((__malloc__))
+ char *
+ host_canonname(const struct sockaddr *sap)
+ {
+@@ -266,7 +266,7 @@ host_canonname(const struct sockaddr *sa
+ *
+ * Caller must free the returned structure with freeaddrinfo(3).
+ */
+-__attribute_malloc__
++__attribute__((__malloc__))
+ struct addrinfo *
+ host_reliable_addrinfo(const struct sockaddr *sap)
+ {
+@@ -313,7 +313,7 @@ out_free_hostname:
+ * Caller must free the returned structure with freeaddrinfo(3).
+ */
+ #ifdef HAVE_GETNAMEINFO
+-__attribute_malloc__
++__attribute__((__malloc__))
+ struct addrinfo *
+ host_numeric_addrinfo(const struct sockaddr *sap)
+ {
+@@ -361,7 +361,7 @@ host_numeric_addrinfo(const struct socka
+ return ai;
+ }
+ #else /* !HAVE_GETNAMEINFO */
+-__attribute_malloc__
++__attribute__((__malloc__))
+ struct addrinfo *
+ host_numeric_addrinfo(const struct sockaddr *sap)
+ {
diff --git a/package/nfs-utils/patches/patch-support_include_conffile_h b/package/nfs-utils/patches/patch-support_include_conffile_h
new file mode 100644
index 000000000..308a40a4f
--- /dev/null
+++ b/package/nfs-utils/patches/patch-support_include_conffile_h
@@ -0,0 +1,20 @@
+--- nfs-utils-1.3.0.orig/support/include/conffile.h 2014-03-25 16:12:07.000000000 +0100
++++ nfs-utils-1.3.0/support/include/conffile.h 2014-05-17 21:52:16.997590916 +0200
+@@ -33,7 +33,7 @@
+ #ifndef _CONFFILE_H_
+ #define _CONFFILE_H_
+
+-#include <sys/queue.h>
++#include "queue.h"
+ #include <ctype.h>
+
+ struct conf_list_node {
+@@ -49,7 +49,7 @@ struct conf_list {
+ extern char *conf_path;
+
+ extern int conf_begin(void);
+-extern int conf_decode_base64(u_int8_t *, u_int32_t *, u_char *);
++extern int conf_decode_base64(uint8_t *, uint32_t *, unsigned char *);
+ extern int conf_end(int, int);
+ extern void conf_free_list(struct conf_list *);
+ extern struct sockaddr *conf_get_address(char *, char *);
diff --git a/package/nfs-utils/patches/patch-support_include_exportfs_h b/package/nfs-utils/patches/patch-support_include_exportfs_h
new file mode 100644
index 000000000..c58c0c3ec
--- /dev/null
+++ b/package/nfs-utils/patches/patch-support_include_exportfs_h
@@ -0,0 +1,23 @@
+--- nfs-utils-1.3.0.orig/support/include/exportfs.h 2014-03-25 16:12:07.000000000 +0100
++++ nfs-utils-1.3.0/support/include/exportfs.h 2014-05-17 21:47:07.085632108 +0200
+@@ -156,15 +156,15 @@ int secinfo_addflavor(struct flav_inf
+
+ char * host_ntop(const struct sockaddr *sap,
+ char *buf, const size_t buflen);
+-__attribute_malloc__
++__attribute__((__malloc__))
+ struct addrinfo * host_pton(const char *paddr);
+-__attribute_malloc__
++__attribute__((__malloc__))
+ struct addrinfo * host_addrinfo(const char *hostname);
+-__attribute_malloc__
++__attribute__((__malloc__))
+ char * host_canonname(const struct sockaddr *sap);
+-__attribute_malloc__
++__attribute__((__malloc__))
+ struct addrinfo * host_reliable_addrinfo(const struct sockaddr *sap);
+-__attribute_malloc__
++__attribute__((__malloc__))
+ struct addrinfo * host_numeric_addrinfo(const struct sockaddr *sap);
+
+ int rmtab_read(void);
diff --git a/package/nfs-utils/patches/patch-support_include_sockaddr_h b/package/nfs-utils/patches/patch-support_include_sockaddr_h
new file mode 100644
index 000000000..52b564bd3
--- /dev/null
+++ b/package/nfs-utils/patches/patch-support_include_sockaddr_h
@@ -0,0 +1,10 @@
+--- nfs-utils-1.3.0.orig/support/include/sockaddr.h 2014-03-25 16:12:07.000000000 +0100
++++ nfs-utils-1.3.0/support/include/sockaddr.h 2014-05-17 21:40:15.148504458 +0200
+@@ -27,6 +27,7 @@
+ #ifdef HAVE_LIBIO_H
+ #include <libio.h>
+ #endif
++#include <stdlib.h>
+ #include <stdbool.h>
+ #include <sys/socket.h>
+ #include <netinet/in.h>
diff --git a/package/nfs-utils/patches/patch-support_nfs_conffile_c b/package/nfs-utils/patches/patch-support_nfs_conffile_c
new file mode 100644
index 000000000..0c59eea59
--- /dev/null
+++ b/package/nfs-utils/patches/patch-support_nfs_conffile_c
@@ -0,0 +1,42 @@
+--- nfs-utils-1.3.0.orig/support/nfs/conffile.c 2014-03-25 16:12:07.000000000 +0100
++++ nfs-utils-1.3.0/support/nfs/conffile.c 2014-05-17 21:30:36.886783421 +0200
+@@ -72,10 +72,10 @@ TAILQ_HEAD (conf_trans_head, conf_trans)
+ /*
+ * Radix-64 Encoding.
+ */
+-static const u_int8_t bin2asc[]
++static const uint8_t bin2asc[]
+ = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
+
+-static const u_int8_t asc2bin[] =
++static const uint8_t asc2bin[] =
+ {
+ 255, 255, 255, 255, 255, 255, 255, 255,
+ 255, 255, 255, 255, 255, 255, 255, 255,
+@@ -109,10 +109,10 @@ LIST_HEAD (conf_bindings, conf_binding)
+
+ static char *conf_addr;
+
+-static __inline__ u_int8_t
++static __inline__ uint8_t
+ conf_hash(char *s)
+ {
+- u_int8_t hash = 0;
++ uint8_t hash = 0;
+
+ while (*s) {
+ hash = ((hash << 1) | (hash >> 7)) ^ tolower (*s);
+@@ -603,10 +603,10 @@ cleanup:
+
+ /* Decode a PEM encoded buffer. */
+ int
+-conf_decode_base64 (u_int8_t *out, u_int32_t *len, u_char *buf)
++conf_decode_base64 (uint8_t *out, uint32_t *len, unsigned char *buf)
+ {
+- u_int32_t c = 0;
+- u_int8_t c1, c2, c3, c4;
++ uint32_t c = 0;
++ uint8_t c1, c2, c3, c4;
+
+ while (*buf) {
+ if (*buf > 127 || (c1 = asc2bin[*buf]) == 255)
diff --git a/package/nfs-utils/patches/patch-support_nfs_svc_create_c b/package/nfs-utils/patches/patch-support_nfs_svc_create_c
new file mode 100644
index 000000000..0b2ccbe44
--- /dev/null
+++ b/package/nfs-utils/patches/patch-support_nfs_svc_create_c
@@ -0,0 +1,11 @@
+--- nfs-utils-1.3.0.orig/support/nfs/svc_create.c 2014-03-25 16:12:07.000000000 +0100
++++ nfs-utils-1.3.0/support/nfs/svc_create.c 2014-05-17 21:47:07.089632108 +0200
+@@ -113,7 +113,7 @@ svc_create_find_xprt(const struct sockad
+ *
+ * Otherwise NULL is returned if an error occurs.
+ */
+-__attribute_malloc__
++__attribute__((__malloc__))
+ static struct addrinfo *
+ svc_create_bindaddr(struct netconfig *nconf, const uint16_t port)
+ {
diff --git a/package/nfs-utils/patches/patch-support_nfs_svc_socket_c b/package/nfs-utils/patches/patch-support_nfs_svc_socket_c
new file mode 100644
index 000000000..0e2d99b87
--- /dev/null
+++ b/package/nfs-utils/patches/patch-support_nfs_svc_socket_c
@@ -0,0 +1,17 @@
+--- nfs-utils-1.3.0.orig/support/nfs/svc_socket.c 2014-03-25 16:12:07.000000000 +0100
++++ nfs-utils-1.3.0/support/nfs/svc_socket.c 2014-05-17 21:03:27.077197789 +0200
+@@ -42,8 +42,14 @@ int getservport(u_long number, const cha
+ struct servent servbuf, *servp = NULL;
+ int ret;
+
++#if HAVE_GETRPCBYNUMBER_R
+ ret = getrpcbynumber_r(number, &rpcbuf, rpcdata, sizeof rpcdata,
+ &rpcp);
++#else
++ rpcp = getrpcbynumber(number);
++ ret = 0;
++#endif
++
+ if (ret == 0 && rpcp != NULL) {
+ /* First try name. */
+ ret = getservbyname_r(rpcp->r_name, proto, &servbuf, servdata,
diff --git a/package/nfs-utils/patches/patch-utils_exportfs_exportfs_c b/package/nfs-utils/patches/patch-utils_exportfs_exportfs_c
new file mode 100644
index 000000000..b9cdac29f
--- /dev/null
+++ b/package/nfs-utils/patches/patch-utils_exportfs_exportfs_c
@@ -0,0 +1,13 @@
+--- nfs-utils-1.3.0.orig/utils/exportfs/exportfs.c 2014-03-25 16:12:07.000000000 +0100
++++ nfs-utils-1.3.0/utils/exportfs/exportfs.c 2014-05-17 21:20:01.548725048 +0200
+@@ -12,6 +12,10 @@
+ #include <config.h>
+ #endif
+
++#ifndef _GNU_SOURCE
++#define _GNU_SOURCE
++#endif
++
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <sys/vfs.h>
diff --git a/package/nfs-utils/patches/patch-utils_mountd_cache_c b/package/nfs-utils/patches/patch-utils_mountd_cache_c
new file mode 100644
index 000000000..440f46d82
--- /dev/null
+++ b/package/nfs-utils/patches/patch-utils_mountd_cache_c
@@ -0,0 +1,22 @@
+--- nfs-utils-1.3.0.orig/utils/mountd/cache.c 2014-03-25 16:12:07.000000000 +0100
++++ nfs-utils-1.3.0/utils/mountd/cache.c 2014-05-17 21:57:07.653571824 +0200
+@@ -11,6 +11,10 @@
+ #include <config.h>
+ #endif
+
++#ifndef _GNU_SOURCE
++#define _GNU_SOURCE
++#endif
++
+ #include <sys/types.h>
+ #include <sys/select.h>
+ #include <sys/stat.h>
+@@ -1339,7 +1343,7 @@ static int cache_export_ent(char *domain
+ */
+ struct stat stb;
+ size_t l = strlen(exp->e_path);
+- __dev_t dev;
++ dev_t dev;
+
+ if (strlen(path) <= l || path[l] != '/' ||
+ strncmp(exp->e_path, path, l) != 0)
diff --git a/package/nfs-utils/patches/patch-utils_mountd_v4root_c b/package/nfs-utils/patches/patch-utils_mountd_v4root_c
new file mode 100644
index 000000000..420744173
--- /dev/null
+++ b/package/nfs-utils/patches/patch-utils_mountd_v4root_c
@@ -0,0 +1,11 @@
+--- nfs-utils-1.3.0.orig/utils/mountd/v4root.c 2014-03-25 16:12:07.000000000 +0100
++++ nfs-utils-1.3.0/utils/mountd/v4root.c 2014-05-17 21:59:01.129569213 +0200
+@@ -13,7 +13,7 @@
+
+ #include <sys/types.h>
+ #include <sys/stat.h>
+-#include <sys/queue.h>
++#include "queue.h"
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <ctype.h>
diff --git a/package/nfs-utils/patches/patch-utils_nfsstat_nfsstat_c b/package/nfs-utils/patches/patch-utils_nfsstat_nfsstat_c
new file mode 100644
index 000000000..333d35322
--- /dev/null
+++ b/package/nfs-utils/patches/patch-utils_nfsstat_nfsstat_c
@@ -0,0 +1,11 @@
+--- nfs-utils-1.3.0.orig/utils/nfsstat/nfsstat.c 2014-03-25 16:12:07.000000000 +0100
++++ nfs-utils-1.3.0/utils/nfsstat/nfsstat.c 2014-05-17 21:57:15.697571551 +0200
+@@ -336,7 +336,7 @@ main(int argc, char **argv)
+
+ struct sigaction act = {
+ .sa_handler = unpause,
+- .sa_flags = SA_ONESHOT,
++ .sa_flags = SA_RESETHAND,
+ };
+
+ if ((progname = strrchr(argv[0], '/')))
diff --git a/package/nfs-utils/patches/patch-utils_statd_hostname_c b/package/nfs-utils/patches/patch-utils_statd_hostname_c
new file mode 100644
index 000000000..c0863e42b
--- /dev/null
+++ b/package/nfs-utils/patches/patch-utils_statd_hostname_c
@@ -0,0 +1,29 @@
+--- nfs-utils-1.3.0.orig/utils/statd/hostname.c 2014-03-25 16:12:07.000000000 +0100
++++ nfs-utils-1.3.0/utils/statd/hostname.c 2014-05-17 21:47:07.089632108 +0200
+@@ -105,7 +105,7 @@ statd_present_address(const struct socka
+ * Look up the hostname; report exceptional errors. Caller must
+ * call freeaddrinfo(3) if a valid addrinfo is returned.
+ */
+-__attribute_malloc__
++__attribute__((__malloc__))
+ static struct addrinfo *
+ get_addrinfo(const char *hostname, const struct addrinfo *hint)
+ {
+@@ -184,7 +184,7 @@ get_nameinfo(const struct sockaddr *sap,
+ * We won't monitor peers that don't have a reverse map. The canonical
+ * name gives us a key for our monitor list.
+ */
+-__attribute_malloc__
++__attribute__((__malloc__))
+ char *
+ statd_canonical_name(const char *hostname)
+ {
+@@ -234,7 +234,7 @@ statd_canonical_name(const char *hostnam
+ * NULL if some error occurs. Caller must free the returned
+ * list with freeaddrinfo(3).
+ */
+-__attribute_malloc__
++__attribute__((__malloc__))
+ static struct addrinfo *
+ statd_canonical_list(const char *hostname)
+ {
diff --git a/package/nfs-utils/patches/patch-utils_statd_rmtcall_c b/package/nfs-utils/patches/patch-utils_statd_rmtcall_c
new file mode 100644
index 000000000..eab15c5a7
--- /dev/null
+++ b/package/nfs-utils/patches/patch-utils_statd_rmtcall_c
@@ -0,0 +1,13 @@
+--- nfs-utils-1.3.0.orig/utils/statd/rmtcall.c 2014-03-25 16:12:07.000000000 +0100
++++ nfs-utils-1.3.0/utils/statd/rmtcall.c 2014-05-17 22:00:46.441569123 +0200
+@@ -90,8 +90,10 @@ statd_get_socket(void)
+ __func__);
+ break;
+ }
++#if 0
+ se = getservbyport(sin.sin_port, "udp");
+ if (se == NULL)
++#endif
+ break;
+ /* rather not use that port, try again */
+
diff --git a/package/nfs-utils/patches/patch-utils_statd_sm-notify_c b/package/nfs-utils/patches/patch-utils_statd_sm-notify_c
new file mode 100644
index 000000000..76bef0d37
--- /dev/null
+++ b/package/nfs-utils/patches/patch-utils_statd_sm-notify_c
@@ -0,0 +1,38 @@
+--- nfs-utils-1.3.0.orig/utils/statd/sm-notify.c 2014-03-25 16:12:07.000000000 +0100
++++ nfs-utils-1.3.0/utils/statd/sm-notify.c 2014-05-17 21:47:07.089632108 +0200
+@@ -74,7 +74,7 @@ static int record_pid(void);
+
+ static struct nsm_host * hosts = NULL;
+
+-__attribute_malloc__
++__attribute__((__malloc__))
+ static struct addrinfo *
+ smn_lookup(const char *name)
+ {
+@@ -149,7 +149,7 @@ smn_get_hostname(const struct sockaddr *
+ * if the canonical name doesn't exist or cannot be determined.
+ * The caller must free the result with free(3).
+ */
+-__attribute_malloc__
++__attribute__((__malloc__))
+ static char *
+ smn_verify_my_name(const char *name)
+ {
+@@ -189,7 +189,7 @@ smn_verify_my_name(const char *name)
+ return retval;
+ }
+
+-__attribute_malloc__
++__attribute__((__malloc__))
+ static struct nsm_host *
+ smn_alloc_host(const char *hostname, const char *mon_name,
+ const char *my_name, const time_t timestamp)
+@@ -343,7 +343,7 @@ static int smn_socket(void)
+ * If admin specified a source address or srcport, then convert those
+ * to a sockaddr and return it. Otherwise, return an ANYADDR address.
+ */
+-__attribute_malloc__
++__attribute__((__malloc__))
+ static struct addrinfo *
+ smn_bind_address(const char *srcaddr, const char *srcport)
+ {
diff --git a/package/nfs-utils/patches/patch-utils_statd_statd_h b/package/nfs-utils/patches/patch-utils_statd_statd_h
new file mode 100644
index 000000000..73625326a
--- /dev/null
+++ b/package/nfs-utils/patches/patch-utils_statd_statd_h
@@ -0,0 +1,11 @@
+--- nfs-utils-1.3.0.orig/utils/statd/statd.h 2014-03-25 16:12:07.000000000 +0100
++++ nfs-utils-1.3.0/utils/statd/statd.h 2014-05-17 21:47:07.089632108 +0200
+@@ -25,7 +25,7 @@
+ extern _Bool statd_matchhostname(const char *hostname1, const char *hostname2);
+ extern _Bool statd_present_address(const struct sockaddr *sap, char *buf,
+ const size_t buflen);
+-__attribute_malloc__
++__attribute__((__malloc__))
+ extern char * statd_canonical_name(const char *hostname);
+
+ extern void my_svc_run(void);