Bacula on SCO Unix
I'm on of those poor souls, who still has an old SCO Unix box around. Having the need to compile a bacula-fd client on this box, I'm writing down a couple of notes, because I keep forgetting it everytime I need to upgrade to a newer bacula version (this time it was 1.38.11):
Configure with: _ LDFLAGS=-pthread ./configure --enable-client-only --disable-conio_
You'll get the following errors:
bnet_server.c:36: warning: aggregate has a partly bracketed initializer
bnet_server.c:36: warning: aggregate has a partly bracketed initializer
bnet_server.c:36: warning: aggregate has a partly bracketed initializer
bnet_server.c:36: warning: aggregate has a partly bracketed initializer
bnet_server.c:36: warning: aggregate has a partly bracketed initializer
bnet_server.c:36: warning: aggregate has a partly bracketed initializer
bnet_server.c: In function void bnet_thread_server(dlist *, int, workq_t *, void * (*)(void *))':
bnet_server.c:166: passing
int ' as argument 3 of `accept(int, sockaddr , size_t *)' changes signedness
*** Error code 1 (bu21)
UX:make: ERROR: fatal error.
You need to apply the following changes to src/filed/filed.c and src/lib/bnet_server.c: _ ` *** filed.c.orig Thu Sep 7 10:59:48 2006 --- filed.c Thu Sep 7 11:00:01 2006
*** 225,231 struct sockaddr client_addr; int port = -1; socklen_t client_addr_len = sizeof(client_addr); ! if (getsockname(0, &client;_addr, &client;_addr_len) == 0) { / MA BUG 6 remove ifdefs / port = sockaddr_get_port_net_order(&client;_addr); } --- 225,231 ---- struct sockaddr client_addr; int port = -1; socklen_t client_addr_len = sizeof(client_addr); ! if (getsockname(0, &client;_addr, &(size_t)client_addr_len) == 0) { / MA BUG 6 remove ifdefs / port = sockaddr_get_port_net_order(&client;addr); }`
_`*** bnet_server.c.orig Thu Sep 7 10:43:25 2006
--- bnet_server.c Thu Sep 7 10:46:52 2006
*** 163,169 / Got a connection, now accept it. / do { clilen = sizeof(cli_addr); ! newsockfd = accept(fd_ptr->fd, &cli;_addr, &clilen;); } while (newsockfd < 0 && errno == EINTR); if (newsockfd < 0) { continue; --- 163,169 ---- / Got a connection, now accept it. / do { clilen = sizeof(cli_addr); ! newsockfd = accept(fd_ptr->fd, &cli;addr, &(size_t)clilen); } while (newsockfd < 0 && errno == EINTR); if (newsockfd < 0) { continue;`
`` After that compilation should end up cleanly (I use a gcc version 2.95 on this box)