Hello list.

I must warn you I am new to the OpenBSD, so maybe I am doing something wrong, 
but I am unable to compile Bacula 7.4.6 on a freshly installed OpenBSD 6.0. I 
was following "Regression Testing" instructions when I discovered this. 
Compilation fails with following:

Compiling bnet.c
bnet.c: In function 'int set_socket_errno(int)':
bnet.c:632: error: 'EPROTO' was not declared in this scope
make[1]: *** [Makefile:184: bnet.lo] Error 1
make[1]: Leaving directory '/home/misha/bacula/bacula/src/lib'


  ====== Error in /home/misha/bacula/bacula/src/lib ======


make: *** [Makefile:148: all] Error 1

Quick Googleing shows that "EPROTO isn’t defined on OpenBSD", and applying the 
patch at the end of this email gets rid of the error, but what puzzles me is 
the fact that according to "git blame" block of code with that line it in was 
introduced in 2014. Has bacula not been compiled on OpenBSD for this long?

Another possible explanation could be that I’m not using tcp_wrappers when 
compiling bacula (I have a feeling tcp_wrappers have been removed from OpenBSD 
6.0, but I cannot confirm it). Were tcp_wrappers hiding the issue somehow?

---
diff --git a/bacula/src/lib/bnet.c b/bacula/src/lib/bnet.c
index 4eddee2..58e54d8 100644
--- a/bacula/src/lib/bnet.c
+++ b/bacula/src/lib/bnet.c
@@ -629,7 +629,9 @@ int set_socket_errno(int sockstat)
       /* Handle errrors from prior connections as EAGAIN */
       switch (errno) {
          case ENETDOWN:
+#ifdef EPROTO
          case EPROTO:
+#endif
          case ENOPROTOOPT:
          case EHOSTDOWN:
 #ifdef ENONET
--
---
Vanush "Misha" Paturyan
Senior Technical Officer
Room 120
Computer Science Department
EOLAS Building
Maynooth University
Maynooth





Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Bacula-devel mailing list
Bacula-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-devel

Reply via email to