--- libpkgconf/fragment.c
+++ libpkgconf/fragment.c
@@ -35,6 +35,7 @@
 static inline bool
 pkgconf_fragment_is_unmergeable(const char *string)
 {
+	size_t i;
 	static const struct pkgconf_fragment_check check_fragments[] = {
 		{"-framework", 10},
 		{"-isystem", 8},
@@ -57,7 +58,7 @@
 	if (*string != '-')
 		return true;
 
-	for (size_t i = 0; i < PKGCONF_ARRAY_SIZE(check_fragments); i++)
+	for (i = 0; i < PKGCONF_ARRAY_SIZE(check_fragments); i++)
 		if (!strncmp(string, check_fragments[i].token, check_fragments[i].len))
 			return true;
 
--- libpkgconf/path.c
+++ libpkgconf/path.c
@@ -281,6 +281,7 @@
 static char *
 normpath(const char *path)
 {
+	int ii;
 	if (!path)
 		return NULL;
 
@@ -289,7 +290,7 @@ normpath(const char *path)
 		return NULL;
 	char *ptr = copy;
 
-	for (int ii = 0; copy[ii]; ii++)
+	for (ii = 0; copy[ii]; ii++)
 	{
 		*ptr++ = path[ii];
 		if ('/' == path[ii])
--- libpkgconf/personality.c
+++ libpkgconf/personality.c
@@ -57,14 +57,15 @@
 #elif __HAIKU__
 	char **paths;
 	size_t count;
+	size_t i;
 	if (find_paths(B_FIND_PATH_DEVELOP_LIB_DIRECTORY, "pkgconfig", &paths, &count) == B_OK) {
-		for (size_t i = 0; i < count; i++)
+		for (i = 0; i < count; i++)
 			pkgconf_path_add(paths[i], dirlist, true);
 		free(paths);
 		paths = NULL;
 	}
 	if (find_paths(B_FIND_PATH_DATA_DIRECTORY, "pkgconfig", &paths, &count) == B_OK) {
-		for (size_t i = 0; i < count; i++)
+		for (i = 0; i < count; i++)
 			pkgconf_path_add(paths[i], dirlist, true);
 		free(paths);
 		paths = NULL;
