diff options
author | Brahmajit Das <brahmajit.xyz@gmail.com> | 2023-08-03 19:32:37 +0000 |
---|---|---|
committer | Joonas Niilola <juippis@gentoo.org> | 2023-08-19 15:51:08 +0300 |
commit | 6373daa40e8a7bbd5a6325b90ca23bce70db99c9 (patch) | |
tree | 033147f869f056252b58d661e86a93eaee533106 /app-misc/dvorak7min/files | |
parent | app-emulation/libvirt-snmp: update HOMEPAGE, SRC_URI (diff) | |
download | gentoo-6373daa40e8a7bbd5a6325b90ca23bce70db99c9.tar.gz gentoo-6373daa40e8a7bbd5a6325b90ca23bce70db99c9.tar.bz2 gentoo-6373daa40e8a7bbd5a6325b90ca23bce70db99c9.zip |
app-misc/dvorak7min: Fix call to undeclared library function index
Closes: https://bugs.gentoo.org/894546
Signed-off-by: Brahmajit Das <brahmajit.xyz@gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/32160
Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'app-misc/dvorak7min/files')
-rw-r--r-- | app-misc/dvorak7min/files/dvorak7min-1.6.1-clang16-build-fix.patch | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/app-misc/dvorak7min/files/dvorak7min-1.6.1-clang16-build-fix.patch b/app-misc/dvorak7min/files/dvorak7min-1.6.1-clang16-build-fix.patch new file mode 100644 index 000000000000..27c54dc595b7 --- /dev/null +++ b/app-misc/dvorak7min/files/dvorak7min-1.6.1-clang16-build-fix.patch @@ -0,0 +1,29 @@ +Bug: https://bugs.gentoo.org/894546 +--- a/dvorak7min.c ++++ b/dvorak7min.c +@@ -41,6 +41,7 @@ + * + */ + ++#define _GNU_SOURCE + #include <strings.h> + #include <string.h> + #include <stdlib.h> +@@ -435,7 +436,7 @@ void do_text (char * const text) + timeCurrent = time(0); + speed = calcSpeed (timeStart, timeCurrent, hits + misses); + // Use WPS/WPM as better standards +- mvprintw (LINES - 1, 0, "WPS %.2f WPM %.2f Hits: %d Misses: %d Seconds: %d Ratio: %.2f%%", speed, speed * 60, hits, misses, time(0) - timeStart, ratio); ++ mvprintw (LINES - 1, 0, "WPS %.2f WPM %.2f Hits: %d Misses: %d Seconds: %ld Ratio: %.2f%%", speed, speed * 60, hits, misses, time(0) - timeStart, ratio); + clrtoeol(); + } + } while (ch == ERR); +@@ -521,7 +522,7 @@ void do_text (char * const text) + } else { + float ratio = hits - misses; + ratio = (ratio < 0) ? 0 : (100.0 * ratio / hits); +- mvprintw (0, 0, "Elapsed time: %d seconds", timeFinish - timeStart); ++ mvprintw (0, 0, "Elapsed time: %ld seconds", timeFinish - timeStart); + mvprintw (1, 0, "Total: %d Misses: %d Ratio: %.2f%%", + hits + misses, misses, + (float)100*(hits) / (hits + misses)); |