1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
|
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 */
|