aboutsummaryrefslogtreecommitdiff
path: root/mkfontscale/hash.c
diff options
context:
space:
mode:
Diffstat (limited to 'mkfontscale/hash.c')
-rw-r--r--mkfontscale/hash.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/mkfontscale/hash.c b/mkfontscale/hash.c
index d83422278..adf59412b 100644
--- a/mkfontscale/hash.c
+++ b/mkfontscale/hash.c
@@ -25,6 +25,7 @@
#endif
#include <stdlib.h>
+#include <unistd.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
@@ -152,7 +153,8 @@ hashElements(HashTablePtr table)
static int
key_first_cmp(const void *v1, const void *v2)
{
- const HashBucketPtr *b1 = v1, *b2 = v2;
+ const HashBucketPtr *b1 = (const HashBucketPtr *)v1;
+ const HashBucketPtr *b2 = (const HashBucketPtr *)v2;
int c1 = strcasecmp((*b1)->key, (*b2)->key);
if(c1 != 0) return c1;
return strcmp((*b1)->value, (*b2)->value);
@@ -161,7 +163,8 @@ key_first_cmp(const void *v1, const void *v2)
static int
value_first_cmp(const void *v1, const void *v2)
{
- const HashBucketPtr *b1 = v1, *b2 = v2;
+ const HashBucketPtr *b1 = (const HashBucketPtr *)v1;
+ const HashBucketPtr *b2 = (const HashBucketPtr *)v2;
int c1 = strcmp((*b1)->value, (*b2)->value);
if(c1 != 0) return c1;
return strcasecmp((*b1)->key, (*b2)->key);