Bug#969684: [PATCH 1/3] Add headers for memset, strncpy, etc.

Rob Browning rlb at defaultvalue.org
Tue Nov 24 00:17:50 GMT 2020


---
 src/animatedCollection.cc | 1 +
 src/flag.cc               | 2 ++
 src/fountain.cc           | 2 ++
 src/goal.cc               | 2 ++
 src/guile.cc              | 1 +
 src/highScore.cc          | 1 +
 src/settings.cc           | 1 +
 src/weather.cc            | 2 ++
 8 files changed, 12 insertions(+)

diff --git a/src/animatedCollection.cc b/src/animatedCollection.cc
index 2b90be0..cff826c 100644
--- a/src/animatedCollection.cc
+++ b/src/animatedCollection.cc
@@ -23,6 +23,7 @@
 /* For std::sort, std::nth_element */
 #include <algorithm>
 
+#include <cstring>
 #include <set>
 
 static int AC_DEBUG = 0;
diff --git a/src/flag.cc b/src/flag.cc
index 74b4161..bbedb0b 100644
--- a/src/flag.cc
+++ b/src/flag.cc
@@ -24,6 +24,8 @@
 #include "player.h"
 #include "sound.h"
 
+#include <cstring>
+
 Flag::Flag(Real x, Real y, int points, int visible, Real radius)
     : Animated(Role_OtherAnimated, 1) {
   scoreOnDeath = points;
diff --git a/src/fountain.cc b/src/fountain.cc
index 85a7f7c..68e7973 100644
--- a/src/fountain.cc
+++ b/src/fountain.cc
@@ -23,6 +23,8 @@
 #include "player.h"
 #include "settings.h"
 
+#include <cstring>
+
 Fountain::Fountain(const Coord3d &pos, double randomSpeed, double radius, double strength)
     : Animated(Role_OtherAnimated, 1),
       randomSpeed(randomSpeed),
diff --git a/src/goal.cc b/src/goal.cc
index b55e1e5..0070c0b 100644
--- a/src/goal.cc
+++ b/src/goal.cc
@@ -24,6 +24,8 @@
 #include "map.h"
 #include "player.h"
 
+#include <cstring>
+
 Goal::Goal(Real x, Real y, int rotate, char *nextLevel) : Flag(x, y, 1000, 1, 0.2) {
   strncpy(this->nextLevel, nextLevel, sizeof(this->nextLevel));
   this->rotate = rotate;
diff --git a/src/guile.cc b/src/guile.cc
index ade906b..655cf65 100644
--- a/src/guile.cc
+++ b/src/guile.cc
@@ -55,6 +55,7 @@
 
 #include <zlib.h>
 #include <cstdlib>
+#include <cstring>
 
 /* Object coordinates are shifted by DX/DY relative to map coordinates in the API
  * Thus, a flag, ball, etc. placed at (222,225) will appear at (222+DX,225+DY)
diff --git a/src/highScore.cc b/src/highScore.cc
index 2b6da98..a1d05cc 100644
--- a/src/highScore.cc
+++ b/src/highScore.cc
@@ -28,6 +28,7 @@
 
 #include <libguile.h>
 #include <zlib.h>
+#include <cstring>
 #include <cstdlib>
 
 static char highScorePath[256];
diff --git a/src/settings.cc b/src/settings.cc
index e9c2a1a..4e6478b 100644
--- a/src/settings.cc
+++ b/src/settings.cc
@@ -31,6 +31,7 @@
 #include <string.h>
 #include <sys/stat.h>
 #include <cstdlib>
+#include <unistd.h>
 
 extern double timeDilationFactor;
 
diff --git a/src/weather.cc b/src/weather.cc
index a72de8b..1fd340a 100644
--- a/src/weather.cc
+++ b/src/weather.cc
@@ -24,6 +24,8 @@
 #include "player.h"
 #include "settings.h"
 
+#include <cstring>
+
 Weather::Weather() {
   if (Settings::settings->gfx_details <= 2) max_weather_particles = 500;
   if (Settings::settings->gfx_details == 3) max_weather_particles = 1000;
-- 
2.29.2



More information about the Pkg-games-devel mailing list