maelstrom: fix build with gcc14

- add patch with `#include <time.h>` fixing:
`error: implicit declaration of function 'time'`
This commit is contained in:
ghpzin 2025-03-30 01:59:10 +03:00
parent 0a5d47a772
commit 756b7e3f8a
2 changed files with 14 additions and 0 deletions

View file

@ -0,0 +1,12 @@
diff --git a/Maelstrom-netd.c b/Maelstrom-netd.c
index 3e6e942..41ed9a5 100644
--- a/Maelstrom-netd.c
+++ b/Maelstrom-netd.c
@@ -13,6 +13,7 @@
#include <arpa/inet.h>
#include <netdb.h>
#include <unistd.h>
+#include <time.h>
/* We wait in a loop for players to connect and tell us how many people
are playing. Then, once all players have connected, then we broadcast

View file

@ -21,6 +21,8 @@ stdenv.mkDerivation rec {
./fix-compilation.patch
# removes register keyword
./c++17-fixes.diff
# fix build with gcc14
./add-maelstrom-netd-include-time.diff
];
buildInputs = [