Ticket #10: 65_freebsd.2.patch
File 65_freebsd.2.patch, 2.6 KB (added by , 16 years ago) |
---|
-
cciss.cpp
a b 19 19 # include <sys/endian.h> 20 20 # include <dev/ciss/cissio.h> 21 21 # define _HAVE_CCISS 22 #elif defined(__FreeBSD_kernel__) && defined(HAVE_DEV_CISS_CISSIO_H) 23 # include <endian.h> 24 # include <dev/ciss/cissio.h> 25 # define _HAVE_CCISS 22 26 #endif 23 27 24 28 #ifdef _HAVE_CCISS -
os_freebsd.cpp
a b 49 49 50 50 #define USBDEV "/dev/usb" 51 51 52 #if __FreeBSD_version >= 80000052 #if (__FreeBSD_version >= 800000) || (__FreeBSD_kernel_version >= 800000) 53 53 #include <libusb20_desc.h> 54 54 #include <libusb20.h> 55 55 #else … … private: 178 178 const char * m_mode; ///< Mode string for deviceopen(). 179 179 }; 180 180 181 #ifdef __GLIBC__ 182 static inline void * reallocf(void *ptr, size_t size) { 183 void *rv = realloc(ptr, size); 184 if(rv == NULL) 185 free(ptr); 186 return rv; 187 } 188 #endif 181 189 182 190 freebsd_smart_device::~freebsd_smart_device() throw() 183 191 { … … int freebsd_ata_device::ata_command_inte 745 753 #endif 746 754 return -1; 747 755 748 #if __FreeBSD_version < 502000756 #if (__FreeBSD_version < 502000) && (__FreeBSD_kernel_version < 502000) 749 757 printwarning(NO_RETURN,NULL); 750 758 #endif 751 759 … … int do_normal_scsi_cmnd_io(int fd, struc 1357 1365 1358 1366 if (cam_send_ccb(cam_dev,ccb) < 0) { 1359 1367 warn("error sending SCSI ccb"); 1360 #if __FreeBSD_version > 5000001368 #if (__FreeBSD_version > 500000) || (__FreeBSD_kernel_version > 500000) 1361 1369 cam_error_print(cam_dev,ccb,CAM_ESF_ALL,CAM_EPF_ALL,stderr); 1362 1370 #endif 1363 1371 cam_freeccb(ccb); … … int do_normal_scsi_cmnd_io(int fd, struc 1365 1373 } 1366 1374 1367 1375 if (((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) && ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_SCSI_STATUS_ERROR)) { 1368 #if __FreeBSD_version > 5000001376 #if (__FreeBSD_version > 500000) || (__FreeBSD_kernel_version > 500000) 1369 1377 cam_error_print(cam_dev,ccb,CAM_ESF_ALL,CAM_EPF_ALL,stderr); 1370 1378 #endif 1371 1379 cam_freeccb(ccb); … … bool freebsd_smart_interface::scan_smart 1998 2006 } 1999 2007 2000 2008 2001 #if __FreeBSD_version < 800000// without this build fail on FreeBSD 82009 #if (__FreeBSD_version < 800000) || (__FreeBSD_kernel_version < 800000) // without this build fail on FreeBSD 8 2002 2010 static char done[USB_MAX_DEVICES]; 2003 2011 2004 2012 static int usbdevinfo(int f, int a, int rec, int busno, unsigned short & vendor_id, … … static int usbdevinfo(int f, int a, int 2054 2062 static int usbdevlist(int busno,unsigned short & vendor_id, 2055 2063 unsigned short & product_id, unsigned short & version) 2056 2064 { 2057 #if __FreeBSD_version >= 800000// libusb2 interface2065 #if (__FreeBSD_version >= 800000) || (__FreeBSD_kernel_version >= 800000) // libusb2 interface 2058 2066 struct libusb20_device *pdev = NULL; 2059 2067 struct libusb20_backend *pbe; 2060 2068 uint32_t matches = 0;