From: Eric Bollengier Date: Mon, 14 Feb 2022 14:22:18 +0000 (+0100) Subject: Fix windows compilation X-Git-Tag: Beta-15.0.0~644 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=58b3c6c2eccf036996c5205d0be48303080977f5;p=thirdparty%2Fbacula.git Fix windows compilation --- diff --git a/bacula/src/lib/bsys.c b/bacula/src/lib/bsys.c index 2f135068b..4f7643e9a 100644 --- a/bacula/src/lib/bsys.c +++ b/bacula/src/lib/bsys.c @@ -1255,7 +1255,7 @@ bail_out: #else /* HAVE_BACKTRACE && HAVE_GCC */ void stack_trace() {} void gdb_stack_trace() {} -void gdb_print_local() {} +void gdb_print_local(int level) {} #endif /* HAVE_BACKTRACE && HAVE_GCC */ #ifdef HAVE_SYS_STATVFS_H diff --git a/bacula/src/lib/unittests.c b/bacula/src/lib/unittests.c index 5f991a308..b6d68e70d 100644 --- a/bacula/src/lib/unittests.c +++ b/bacula/src/lib/unittests.c @@ -454,7 +454,7 @@ void fsu_mkpath(const char *newPath) free_and_null_pool_memory(syscmd); #else POOLMEM *fullPath = get_pool_memory(PM_MESSAGE); - Mmsg(fullPath, "%s", dirPath, newPath); + Mmsg(fullPath, "%s", newPath); int rc = _mkdir(fullPath); if (rc < 0) { printf("ERROR : Could not create path %s. Error: %s\n", diff --git a/bacula/src/tools/bsock_meeting_test.c b/bacula/src/tools/bsock_meeting_test.c index a6a51e178..33bb244d1 100644 --- a/bacula/src/tools/bsock_meeting_test.c +++ b/bacula/src/tools/bsock_meeting_test.c @@ -262,7 +262,7 @@ int main (int argc, char *argv[]) Unittests t("BsockMeeting", true, true); InitWinAPIWrapper(); WSA_Init(); - start_heap = sbrk(0); + mark_heap(); bindtextdomain("bacula", LOCALEDIR); textdomain("bacula"); init_stack_dump(); diff --git a/bacula/src/win32/tools/Makefile b/bacula/src/win32/tools/Makefile index 760910114..8659d8ffd 100644 --- a/bacula/src/win32/tools/Makefile +++ b/bacula/src/win32/tools/Makefile @@ -21,7 +21,7 @@ DEFINES = \ LDFLAGS:=$(LDFLAGS) -lstdc++ -vpath %.c $(MAINDIR)/src/tools $(MAINDIR)/src/dird $(MAINDIR)/src/plugins/fd +vpath %.c $(MAINDIR)/src/tools $(MAINDIR)/src/dird $(MAINDIR)/src/plugins/fd $(MAINDIR)/src/lib vpath %.cpp $(MAINDIR)/src/tools $(MAINDIR)/src/dird $(MAINDIR)/src/tools/cdp-client ########################################################################## @@ -45,7 +45,8 @@ ALL_OBJS = \ $(OBJDIR)/testfind.o \ $(OBJDIR)/testls.o \ $(OBJDIR)/bregex.o \ - $(OBJDIR)/bwild.o + $(OBJDIR)/bwild.o \ + $(OBJDIR)/bpipe-test.o ########################################################################## @@ -77,9 +78,10 @@ clean: $(call clean_exe,$(BINDIR)/bsock_meeting_test.exe) $(call clean_exe,$(BINDIR)/thread.exe) $(call clean_exe,$(BINDIR)/cdp-client.exe) + $(call clean_exe,$(BINDIR)/bpipe-test.exe) $(ECHO_CMD)rm -rf $(OBJDIRS) -tests: $(BINDIR)/bsock_meeting_test.exe $(BINDIR)/thread.exe +tests: $(BINDIR)/bpipe-test.exe $(BINDIR)/bsock_meeting_test.exe $(BINDIR)/thread.exe # @@ -131,6 +133,9 @@ TEST_LIBS = \ $(BINDIR)/bsock_meeting_test.exe: $(OBJDIR)/bsock_meeting_test.o $(OBJDIR)/unittests.o $(LIBS_BACULA) $(call link_conapp,$(TEST_LIBS)) +$(BINDIR)/bpipe-test.exe: $(OBJDIR)/bpipe-test.o $(OBJDIR)/unittests.o $(LIBS_BACULA) + $(call link_conapp,$(TEST_LIBS)) + $(BINDIR)/cdp-client.exe: $(OBJDIR)/cdp-client.o $(OBJDIR)/backupservice.o $(OBJDIR)/folderwatcher.o $(OBJDIR)/journal.o $(LIBS_BACULA) $(call link_conapp,$(LIBS_PTHREADS))