found 537856 5.38+svn2879-1
found 537856 5.38+svn2879-2
--

Hi,

two more problems with current snapshot.

1) The os_freebsd.cpp uses reallocf(), which is specific for *BSD libc.
See http://leaf.dragonflybsd.org/cgi/web-man?command=reallocf&section=3

Please, could you add implementation directly into os_freebsd.cpp
for GLIBC based systems - patch is bellow.

2) This part of original submission is not included upstream:

--- 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


Thanks again.

        Petr

--- os_freebsd.cpp
+++ os_freebsd.cpp
@@ -79,6 +79,15 @@
 // forward declaration
// static int parse_ata_chan_dev(const char * dev_name, struct freebsd_dev_channel *ch);

+#ifdef __GLIBC__
+static inline void * reallocf(void *ptr, size_t size)
+{
+  void *rv = realloc(ptr, size);
+  if(rv == NULL)
+    free(ptr);
+  return rv;
+}
+#endif

// Returns 1 if device not available/open/found else 0. Also shifts fd into valid range.
 static int isnotopen(int *fd, struct freebsd_dev_channel** fdchan) {




--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to