xmoto: fix with gcc7
This commit is contained in:
parent
1e6fdc225f
commit
bbc0d6f54c
2 changed files with 72 additions and 0 deletions
47
srcpkgs/xmoto/patches/fix-gcc7.patch
Normal file
47
srcpkgs/xmoto/patches/fix-gcc7.patch
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
--- ./src/WWW.cpp.orig 2018-01-16 10:53:58.725405426 +0100
|
||||||
|
+++ ./src/WWW.cpp 2018-01-16 10:55:14.802101942 +0100
|
||||||
|
@@ -206,7 +206,7 @@ void FSWeb::downloadFile(const std::stri
|
||||||
|
std::string v_www_agent = WWW_AGENT;
|
||||||
|
|
||||||
|
/* open the file */
|
||||||
|
- if( (v_destinationFile = fopen(v_local_file_tmp.c_str(), "wb")) == false) {
|
||||||
|
+ if( !(v_destinationFile = fopen(v_local_file_tmp.c_str(), "wb")) ) {
|
||||||
|
throw Exception("error : unable to open output file "
|
||||||
|
+ v_local_file_tmp);
|
||||||
|
}
|
||||||
|
@@ -320,7 +320,7 @@ void FSWeb::uploadReplay(const std::stri
|
||||||
|
LogInfo(std::string("Uploading replay " + p_replayFilename).c_str());
|
||||||
|
|
||||||
|
/* open the file */
|
||||||
|
- if( (v_destinationFile = fopen(v_local_file.c_str(), "wb")) == false) {
|
||||||
|
+ if( !(v_destinationFile = fopen(v_local_file.c_str(), "wb")) ) {
|
||||||
|
throw Exception("error : unable to open output file " DEFAULT_WWW_MSGFILE("UR"));
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -478,7 +478,7 @@ void FSWeb::sendVote(const std::string&
|
||||||
|
LogInfo("Sending vote");
|
||||||
|
|
||||||
|
/* open the file */
|
||||||
|
- if( (v_destinationFile = fopen(v_local_file.c_str(), "wb")) == false) {
|
||||||
|
+ if( !(v_destinationFile = fopen(v_local_file.c_str(), "wb")) ) {
|
||||||
|
throw Exception("error : unable to open output file " DEFAULT_WWW_MSGFILE("SV"));
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -562,7 +562,7 @@ void FSWeb::sendReport(const std::string
|
||||||
|
LogInfo("Sending report");
|
||||||
|
|
||||||
|
/* open the file */
|
||||||
|
- if( (v_destinationFile = fopen(v_local_file.c_str(), "wb")) == false) {
|
||||||
|
+ if( !(v_destinationFile = fopen(v_local_file.c_str(), "wb")) ) {
|
||||||
|
throw Exception("error : unable to open output file " DEFAULT_WWW_MSGFILE("SR"));
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -677,7 +677,7 @@ void FSWeb::uploadDbSync(const std::stri
|
||||||
|
LogInfo(std::string("Uploading dbsync " + p_dbSyncFilename + " to " + p_url_to_transfert).c_str());
|
||||||
|
|
||||||
|
/* open the file */
|
||||||
|
- if( (v_destinationFile = fopen(p_answerFile.c_str(), "wb")) == false) {
|
||||||
|
+ if( !(v_destinationFile = fopen(p_answerFile.c_str(), "wb")) ) {
|
||||||
|
throw Exception("error : unable to open output file " + p_answerFile);
|
||||||
|
}
|
||||||
|
|
25
srcpkgs/xmoto/patches/fix-include.patch
Normal file
25
srcpkgs/xmoto/patches/fix-include.patch
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
--- src/net/NetActions.cpp.orig 2018-01-16 11:03:55.152026167 +0100
|
||||||
|
+++ src/net/NetActions.cpp 2018-01-16 11:03:59.910007186 +0100
|
||||||
|
@@ -30,7 +30,7 @@ Foundation, Inc., 59 Temple Place, Suite
|
||||||
|
#include <sstream>
|
||||||
|
#include "../helpers/SwapEndian.h"
|
||||||
|
#include "helpers/Net.h"
|
||||||
|
-#include "helpers/utf8.h"
|
||||||
|
+#include "../helpers/utf8.h"
|
||||||
|
|
||||||
|
char NetAction::m_buffer[NETACTION_MAX_PACKET_SIZE];
|
||||||
|
unsigned int NetAction::m_biggestTCPPacketSent = 0;
|
||||||
|
--- src/helpers/utf8.h.orig 2018-01-16 11:08:10.042009362 +0100
|
||||||
|
+++ src/helpers/utf8.h 2018-01-16 11:08:17.306980381 +0100
|
||||||
|
@@ -18,8 +18,8 @@ along with XMOTO; if not, write to the F
|
||||||
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
=============================================================================*/
|
||||||
|
|
||||||
|
-#ifndef __UTF8_H__
|
||||||
|
-#define __UTF8_H__
|
||||||
|
+#ifndef __MYUTF8_H__
|
||||||
|
+#define __MYUTF8_H__
|
||||||
|
|
||||||
|
#include <vector>
|
||||||
|
#include <string>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue