termux-packages/packages/nethack/util-recover.c.patch
Henrik Grimler 1b3ba4bcfe nethack: use absolute paths when saving game
Have not managed to figure out why saving with a relative path
fails. Life is too short to investigate that one full Sunday though,
and this works.
2021-11-27 13:00:41 +01:00

22 lines
602 B
Diff

--- ../NetHack-NetHack-3.6.6_Released/util/recover.c 2020-03-08 18:29:31.000000000 +0100
+++ ./util/recover.c 2020-10-11 16:08:08.285499539 +0200
@@ -13,7 +13,8 @@
#endif
#include "config.h"
-#if !defined(O_WRONLY) && !defined(LSC) && !defined(AZTEC_C)
+#if (!defined(O_WRONLY) && !defined(LSC) && !defined(AZTEC_C)) \
+ || defined(USE_FCNTL)
#include <fcntl.h>
#endif
@@ -38,7 +39,7 @@
#define Close (void) close
#ifdef UNIX
-#define SAVESIZE (PL_NSIZ + 13) /* save/99999player.e */
+#define SAVESIZE 128
#else
#ifdef VMS
#define SAVESIZE (PL_NSIZ + 22) /* [.save]<uid>player.e;1 */