mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-22 19:44:21 +01:00
18bc18abd0
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
45 lines
1.2 KiB
Diff
45 lines
1.2 KiB
Diff
From: Michal Čihař <nijel@debian.org>
|
|
Subject: Fixes compilation with recent GCC which is more strict about C++.
|
|
Bug: http://sourceforge.net/tracker/index.php?func=detail&aid=2125955&group_id=122858&atid=694730
|
|
--- a/src/readline.cpp
|
|
+++ b/src/readline.cpp
|
|
@@ -23,6 +23,7 @@
|
|
#endif
|
|
|
|
#include <cstdio>
|
|
+#include <cstdlib>
|
|
#ifdef WITH_READLINE
|
|
# include <readline/readline.h>
|
|
# include <readline/history.h>
|
|
--- a/src/libwrapper.cpp
|
|
+++ b/src/libwrapper.cpp
|
|
@@ -24,6 +24,7 @@
|
|
|
|
#include <glib/gi18n.h>
|
|
#include <map>
|
|
+#include <cstring>
|
|
|
|
#include "utils.hpp"
|
|
|
|
--- a/src/utils.cpp
|
|
+++ b/src/utils.cpp
|
|
@@ -22,6 +22,8 @@
|
|
# include "config.h"
|
|
#endif
|
|
|
|
+#include <cstdio>
|
|
+#include <cstdlib>
|
|
#include <glib.h>
|
|
#include <glib/gi18n.h>
|
|
|
|
--- a/src/lib/lib.cpp
|
|
+++ b/src/lib/lib.cpp
|
|
@@ -513,7 +513,7 @@
|
|
{
|
|
fseek(idxfile, wordoffset[page_idx], SEEK_SET);
|
|
guint32 page_size=wordoffset[page_idx+1]-wordoffset[page_idx];
|
|
- fread(wordentry_buf, std::min(sizeof(wordentry_buf), page_size), 1, idxfile); //TODO: check returned values, deal with word entry that strlen>255.
|
|
+ fread(wordentry_buf, std::min(sizeof(wordentry_buf), (size_t)page_size), 1, idxfile); //TODO: check returned values, deal with word entry that strlen>255.
|
|
return wordentry_buf;
|
|
}
|
|
|