ports/sysutils/slurm-wlm/files/patch-src_scrun_scrun.c
Thierry Thomas 9adb7c18c4 sysutils/slurm-wlm: upgrade to 23.11.1
Releases notes at <https://www.schedmd.com/news.php>.

Remark: MySQL is no more an option.

Security:	CVE-2023-49933 through CVE-2023-49938
Differential Revision:	<https://reviews.freebsd.org/D42764>
2023-12-18 22:26:58 +01:00

24 lines
534 B
C

--- src/scrun/scrun.c.orig 2023-03-28 20:15:54 UTC
+++ src/scrun/scrun.c
@@ -45,6 +45,9 @@
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
+#ifdef __FreeBSD__
+#include <sys/param.h>
+#endif
#include "src/common/data.h"
#include "src/common/log.h"
@@ -186,7 +189,11 @@ static void _parse_create(int argc, char **argv)
}
if (!state.bundle) {
+#ifdef __FreeBSD__
+ char *dir = getcwd(NULL, PATH_MAX);
+#else
char *dir = get_current_dir_name();
+#endif
state.bundle = xstrdup(dir);
free(dir);
}