aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDuncaen <mail@duncano.de>2017-05-25 19:57:04 +0200
committerDuncaen <mail@duncano.de>2017-05-25 20:04:11 +0200
commit06c62c780be55944365bbf81a377e2878383974e (patch)
treef6631334f42e8281aaa8aa414a0f34948e51fd1d
parentefe8f27cf969b27f17657d5d3c8208dd39a30749 (diff)
downloadlobase-06c62c780be55944365bbf81a377e2878383974e.tar.gz
{lib/libopenbsd,usr.bin/sort}: remove __unused macro
musl has some variables in its headers named __unused, they conflict with this macro and therefor break building.
-rw-r--r--include/compat.h3
-rw-r--r--usr.bin/sort/coll.c10
-rw-r--r--usr.bin/sort/sort.c2
3 files changed, 7 insertions, 8 deletions
diff --git a/include/compat.h b/include/compat.h
index 28de98a..a8ca9eb 100644
--- a/include/compat.h
+++ b/include/compat.h
@@ -11,8 +11,7 @@
#define ALIGN(p) (((size_t)(p) + ALIGNBYTES) &~ ALIGNBYTES)
#endif
-#define __UNUSED __attribute__ ((unused))
-#define __unused __attribute__ ((unused))
+#define __UNUSED __attribute__ ((unused))
#define __dead __attribute__((__noreturn__))
diff --git a/usr.bin/sort/coll.c b/usr.bin/sort/coll.c
index 78272d6..08fefa9 100644
--- a/usr.bin/sort/coll.c
+++ b/usr.bin/sort/coll.c
@@ -782,7 +782,7 @@ cmpsuffix(unsigned char si1, unsigned char si2)
*/
static int
numcoll_impl(struct key_value *kv1, struct key_value *kv2,
- size_t offset __unused, bool use_suffix)
+ size_t offset __UNUSED, bool use_suffix)
{
struct bwstring *s1, *s2;
wchar_t sfrac1[MAX_NUM_SIZE + 1], sfrac2[MAX_NUM_SIZE + 1];
@@ -955,7 +955,7 @@ hnumcoll(struct key_value *kv1, struct key_value *kv2, size_t offset)
*/
static int
randomcoll(struct key_value *kv1, struct key_value *kv2,
- size_t offset __unused)
+ size_t offset __UNUSED)
{
struct bwstring *s1, *s2;
MD5_CTX ctx1, ctx2;
@@ -1008,7 +1008,7 @@ randomcoll(struct key_value *kv1, struct key_value *kv2,
*/
static int
versioncoll(struct key_value *kv1, struct key_value *kv2,
- size_t offset __unused)
+ size_t offset __UNUSED)
{
struct bwstring *s1, *s2;
@@ -1081,7 +1081,7 @@ cmp_nans(double d1, double d2)
*/
static int
gnumcoll(struct key_value *kv1, struct key_value *kv2,
- size_t offset __unused)
+ size_t offset __UNUSED)
{
double d1, d2;
int err1, err2;
@@ -1237,7 +1237,7 @@ gnumcoll(struct key_value *kv1, struct key_value *kv2,
* Implements month sort (-M).
*/
static int
-monthcoll(struct key_value *kv1, struct key_value *kv2, size_t offset __unused)
+monthcoll(struct key_value *kv1, struct key_value *kv2, size_t offset __UNUSED)
{
int val1, val2;
bool key1_read, key2_read;
diff --git a/usr.bin/sort/sort.c b/usr.bin/sort/sort.c
index 782a2e3..d7c2d6a 100644
--- a/usr.bin/sort/sort.c
+++ b/usr.bin/sort/sort.c
@@ -402,7 +402,7 @@ invalid:
* Signal handler that clears the temporary files.
*/
static void
-sig_handler(int sig __unused)
+sig_handler(int sig __UNUSED)
{
clear_tmp_files();
_exit(2);