Description: fix a FTBFS
Author: Jody Bruchon <jody@jodybruchon.com>
Origin: https://codeberg.org/jbruchon/libjodycode/commit/07294bb
Last-Update: 2025-09-25
Index: libjodycode/libjodycode.h
===================================================================
--- libjodycode.orig/libjodycode.h
+++ libjodycode/libjodycode.h
@@ -247,23 +247,6 @@ extern int jc_start_alarm(const unsigned
 extern int jc_stop_alarm(void);
 
 
-/*** batch ***/
-
-struct jc_fileinfo {
-	struct JC_STAT *stat;
-	struct JC_DIRENT *dirent;
-	int status;
-};
-
-struct jc_fileinfo_batch {
-	int count;
-	struct jc_fileinfo files[];
-};
-
-extern struct jc_fileinfo_batch *jc_fileinfo_batch_alloc(const int filecnt, const int stat, const int namlen);
-extern void jc_fileinfo_batch_free(struct jc_fileinfo_batch * const restrict batch);
-
-
 /*** cacheinfo ***/
 
 /* Cache information structure
@@ -347,6 +330,24 @@ extern struct JC_DIRENT *jc_readdir(JC_D
 extern int jc_closedir(JC_DIR * const restrict dirp);
 
 
+/*** batch ***/
+/* This is out of order because it depends on the dir definitions */
+
+struct jc_fileinfo {
+	struct JC_STAT *stat;
+	struct JC_DIRENT *dirent;
+	int status;
+};
+
+struct jc_fileinfo_batch {
+	int count;
+	struct jc_fileinfo files[];
+};
+
+extern struct jc_fileinfo_batch *jc_fileinfo_batch_alloc(const int filecnt, const int stat, const int namlen);
+extern void jc_fileinfo_batch_free(struct jc_fileinfo_batch * const restrict batch);
+
+
 /*** error ***/
 
 extern int32_t jc_errno;
Index: libjodycode/linkfiles.c
===================================================================
--- libjodycode.orig/linkfiles.c
+++ libjodycode/linkfiles.c
@@ -34,7 +34,7 @@ static const char *tempsuffix = TEMPORAR
 static const size_t templen = sizeof TEMPORARY_SUFFIX;
 
 
-static char *alloc_tempname(const struct JC_DIRENT * const restrict dirent)
+static char *alloc_tempname(struct JC_DIRENT *dirent)
 {
 	char *tempname = NULL;
 	size_t len;
Index: libjodycode/win_unicode.c
===================================================================
--- libjodycode.orig/win_unicode.c
+++ libjodycode/win_unicode.c
@@ -97,6 +97,7 @@ int jc_setup_unicode_terminal(int argc,
 		return JC_ESETVBUF;
 	if (stdout_tty != NULL &&_isatty(_fileno(stdout))) *stdout_tty = 1;
 #else
+	(void)argc; (void)wargv; (void)argv;
 	if (stdout_tty != NULL && isatty(fileno(stdout))) *stdout_tty = 1;
 #endif /* ON_WINDOWS */
 
