diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2014-02-12 14:16:10 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2014-02-12 14:16:54 +0000 |
commit | 35038f4a2af51efed7265a064fd4a43ffd8a4b95 (patch) | |
tree | 781c3633801f9fb3abfe269f57e2dc09df0bf8d6 /main/nfs-utils/0001-conffile-use-standard-uint-_t-and-unsigned-char.patch | |
parent | 31c5760db1020fee1de508e573f21a284c11c8e4 (diff) | |
download | aports-35038f4a2af51efed7265a064fd4a43ffd8a4b95.tar.bz2 aports-35038f4a2af51efed7265a064fd4a43ffd8a4b95.tar.xz |
main/nfs-utils: build fixes for musl
Diffstat (limited to 'main/nfs-utils/0001-conffile-use-standard-uint-_t-and-unsigned-char.patch')
-rw-r--r-- | main/nfs-utils/0001-conffile-use-standard-uint-_t-and-unsigned-char.patch | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/main/nfs-utils/0001-conffile-use-standard-uint-_t-and-unsigned-char.patch b/main/nfs-utils/0001-conffile-use-standard-uint-_t-and-unsigned-char.patch new file mode 100644 index 0000000000..fdd76c71b6 --- /dev/null +++ b/main/nfs-utils/0001-conffile-use-standard-uint-_t-and-unsigned-char.patch @@ -0,0 +1,74 @@ +From ae1a0a0fd0191ccc7dd4bbbf0a1803db0bd7ccca Mon Sep 17 00:00:00 2001 +From: Natanael Copa <ncopa@alpinelinux.org> +Date: Wed, 12 Feb 2014 13:40:36 +0000 +Subject: [PATCH 1/7] conffile: use standard uint*_t and unsigned char + +Use the standard integer types. This fixes compiling errors with musl +libc. + +Signed-off-by: Natanael Copa <ncopa@alpinelinux.org> +--- + support/include/conffile.h | 2 +- + support/nfs/conffile.c | 14 +++++++------- + 2 files changed, 8 insertions(+), 8 deletions(-) + +diff --git a/support/include/conffile.h b/support/include/conffile.h +index 05ea5d2..94fb005 100644 +--- a/support/include/conffile.h ++++ b/support/include/conffile.h +@@ -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/support/nfs/conffile.c b/support/nfs/conffile.c +index c3434d5..6b94ec0 100644 +--- a/support/nfs/conffile.c ++++ b/support/nfs/conffile.c +@@ -72,10 +72,10 @@ TAILQ_HEAD (conf_trans_head, conf_trans) conf_trans_queue; + /* + * 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) conf_bindings[256]; + + 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) +-- +1.8.5.3 + |