Package: smartmontools
Severity: important
Version: 5.38-3
Tags: patch
User: glibc-bsd-de...@lists.alioth.debian.org
Usertags: kfreebsd

Hi,

the current version fails to build on GNU/kFreeBSD.

It needs small tweaks, please find attached patch with them.

It would also be nice if you can ask upstream
to include this changes.

Thanks in advance

                        Petr
only in patch2:
unchanged:
--- smartmontools-5.38.orig/cciss.cpp
+++ smartmontools-5.38/cciss.cpp
@@ -19,6 +19,10 @@
 #  include <sys/endian.h>
 #  include <dev/ciss/cissio.h>
 #  define _HAVE_CCISS
+#elif defined(__FreeBSD_kernel__) && defined(HAVE_DEV_CISS_CISSIO_H)
+#  include <endian.h>
+#  include <dev/ciss/cissio.h>
+#  define _HAVE_CCISS
 #endif
 
 #ifdef _HAVE_CCISS
only in patch2:
unchanged:
--- smartmontools-5.38.orig/os_freebsd.cpp
+++ smartmontools-5.38/os_freebsd.cpp
@@ -272,7 +272,6 @@
 }
 
 int highpoint_command_interface(__unused int fd, __unused smart_command_set command, __unused int select, __unused char *data) {
-{
   return -1;
 }
 
@@ -410,7 +410,7 @@
 #endif
       return -1;
 
-#if __FreeBSD_version < 502000
+#if (__FreeBSD_version < 502000) && (__FreeBSD_kernel_version < 502000)
     printwarning(NO_RETURN,NULL);
 #endif
 
@@ -518,7 +519,7 @@
 
   if (cam_send_ccb(cam_dev,ccb) < 0) {
     warn("error sending SCSI ccb");
- #if __FreeBSD_version > 500000
+ #if (__FreeBSD_version > 500000) || (__FreeBSD_kernel_version > 500000)
     cam_error_print(cam_dev,ccb,CAM_ESF_ALL,CAM_EPF_ALL,stderr);
  #endif
     cam_freeccb(ccb);
@@ -526,7 +527,7 @@
   }
 
   if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) {
- #if __FreeBSD_version > 500000
+ #if (__FreeBSD_version > 500000) || (__FreeBSD_kernel_version > 500000)
     cam_error_print(cam_dev,ccb,CAM_ESF_ALL,CAM_EPF_ALL,stderr);
  #endif
     cam_freeccb(ccb);

Reply via email to