From bfc8c2be81032c774ca08f2dd0b7bb591aa5b186 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Thu, 12 Jul 2007 10:32:35 +0000 Subject: [PATCH] kes Fix client-only build. kes Integrate client-only fixes for bsys (initgroups) and conio from Sergey Svishchev for the AIX platform. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@5149 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/ChangeLog | 3 +++ bacula/src/cats/bdb.c | 14 ++++++++++++++ bacula/src/cats/bdb_create.c | 9 +++++++-- bacula/src/console/conio.c | 5 ++++- bacula/src/lib/bsys.c | 5 +++++ bacula/technotes-2.1 | 4 ++++ 6 files changed, 37 insertions(+), 3 deletions(-) diff --git a/bacula/ChangeLog b/bacula/ChangeLog index 6bff27a406..797f5d987e 100644 --- a/bacula/ChangeLog +++ b/bacula/ChangeLog @@ -2,6 +2,9 @@ General: 12Jul07 +kes Fix client-only build. +kes Integrate client-only fixes for bsys (initgroups) and conio from + Sergey Svishchev for the AIX platform. kes Make arguments to get_scratch_volume() in same order as other such calls. kes Rework the prune_volumes() subroutine so that after purging and diff --git a/bacula/src/cats/bdb.c b/bacula/src/cats/bdb.c index 789271f519..60f57849ea 100644 --- a/bacula/src/cats/bdb.c +++ b/bacula/src/cats/bdb.c @@ -72,6 +72,20 @@ static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; #define DB_CLIENT_FILENAME "client.db" #define DB_FILESET_FILENAME "fileset.db" +dbid_list::dbid_list() +{ + memset(this, 0, sizeof(dbid_list)); + max_ids = 1000; + DBId = (DBId_t *)malloc(max_ids * sizeof(DBId_t)); + num_ids = num_seen = tot_ids = 0; + PurgedFiles = NULL; +} + +dbid_list::~dbid_list() +{ + free(DBId); +} + static POOLMEM *make_filename(B_DB *mdb, char *name) { char sep; diff --git a/bacula/src/cats/bdb_create.c b/bacula/src/cats/bdb_create.c index a4f4633ee2..035e755366 100644 --- a/bacula/src/cats/bdb_create.c +++ b/bacula/src/cats/bdb_create.c @@ -62,10 +62,10 @@ bool db_create_pool_record(B_DB *mdb, POOL_DBR *pr); * ----------------------------------------------------------------------- */ -int db_create_file_attributes_record(JCR *jcr, B_DB *mdb, ATTR_DBR *ar) +bool db_create_file_attributes_record(JCR *jcr, B_DB *mdb, ATTR_DBR *ar) { /* *****FIXME***** implement this */ - return 1; + return true; } int db_create_file_item(JCR *jcr, B_DB *mdb, ATTR_DBR *ar) @@ -312,5 +312,10 @@ bool db_create_fileset_record(JCR *jcr, B_DB *mdb, FILESET_DBR *fsr) int db_create_counter_record(JCR *jcr, B_DB *mdb, COUNTER_DBR *cr) { return 0; } +bool db_write_batch_file_records(JCR *jcr) { return false; } +bool my_batch_start(JCR *jcr, B_DB *mdb) { return false; } +bool my_batch_end(JCR *jcr, B_DB *mdb, const char *error) { return false; } +bool my_batch_insert(JCR *jcr, B_DB *mdb, ATTR_DBR *ar) { return false; } + #endif /* HAVE_BACULA_DB */ diff --git a/bacula/src/console/conio.c b/bacula/src/console/conio.c index 967045136e..f8dbfa9be9 100755 --- a/bacula/src/console/conio.c +++ b/bacula/src/console/conio.c @@ -69,6 +69,9 @@ extern "C" char *tgetstr (const char*, char**); extern "C" char *tgoto (const char *, int, int); #elif HAVE_HPUX_OS #include +#elif HAVE_AIX_OS +#include +#include #elif defined (__digital__) && defined (__unix__) extern "C" int tgetent(void *, const char *); extern "C" int tgetnum(const char *); @@ -82,7 +85,7 @@ extern "C" char *tgoto (const char *, int, int); /* From termios library */ -#ifdef HAVE_HPUX_OS +#if defined(HAVE_HPUX_OS) || defined(HAVE_AIX_OS) static char *BC; static char *UP; #else diff --git a/bacula/src/lib/bsys.c b/bacula/src/lib/bsys.c index 8c0d88094b..d094e87011 100644 --- a/bacula/src/lib/bsys.c +++ b/bacula/src/lib/bsys.c @@ -43,6 +43,11 @@ #include #endif +#ifdef HAVE_AIX_OS +extern "C" int initgroups(char *,int); +#endif + + static pthread_mutex_t timer_mutex = PTHREAD_MUTEX_INITIALIZER; static pthread_cond_t timer = PTHREAD_COND_INITIALIZER; diff --git a/bacula/technotes-2.1 b/bacula/technotes-2.1 index 8f97ec5574..5e48a0a57f 100644 --- a/bacula/technotes-2.1 +++ b/bacula/technotes-2.1 @@ -1,7 +1,11 @@ Technical notes on version 2.1 General: +Release 2.1.26 beta 12Jul07 +kes Fix client-only build. +kes Integrate client-only fixes for bsys (initgroups) and conio from + Sergey Svishchev for the AIX platform. kes Make arguments to get_scratch_volume() in same order as other such calls. kes Rework the prune_volumes() subroutine so that after purging and -- 2.39.5