blob: 95511eeec11cc0c6d7248e2993ad4f4443e27216 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
--- 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);
}
|