Skip to content

Commit

Permalink
windows build fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleksiy-Yakovenko committed Jan 13, 2024
1 parent 96b560c commit 1572395
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1154,8 +1154,9 @@ main (int argc, char *argv[]) {
portable_full = 1;
#endif

char *exe_path = calloc (PATH_MAX, 1);
int exe_path_found = 0;
#ifndef _WIN32
char *exe_path = calloc (PATH_MAX, 1);
if (-1 != readlink ("/proc/self/exe", exe_path, PATH_MAX)) {
char *e = strrchr (exe_path, '/');
if (e != NULL) {
Expand All @@ -1174,6 +1175,7 @@ main (int argc, char *argv[]) {
}
}
free (exe_path);
#endif
if (!exe_path_found) {
if (!realpath (argv[0], dbinstalldir)) {
strcpy (dbinstalldir, argv[0]);
Expand Down

0 comments on commit 1572395

Please sign in to comment.