From 81c0fc0b74a7b1f1e6888f50dca66f6eab0b36e8 Mon Sep 17 00:00:00 2001
From: shattered <shattered@4ea69e1a-61f1-4043-bf83-b5c94c648137>
Date: Sat, 8 Dec 2007 17:11:11 +0000
Subject: [PATCH] DragonFly support (untested).  From
 http://www.netbsd.org/cgi-bin/query-pr-single.pl?number=36982.

git-svn-id: https://smartmontools.svn.sourceforge.net/svnroot/smartmontools/trunk@2441 4ea69e1a-61f1-4043-bf83-b5c94c648137
---
 sm5/configure.in   | 6 +++---
 sm5/os_freebsd.cpp | 8 ++++++--
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/sm5/configure.in b/sm5/configure.in
index 89d8800ed..6c51a5c9f 100644
--- a/sm5/configure.in
+++ b/sm5/configure.in
@@ -1,5 +1,5 @@
 #
-# $Id: configure.in,v 1.127 2007/11/13 14:53:27 jhering Exp $
+# $Id: configure.in,v 1.128 2007/12/08 17:11:11 shattered Exp $
 #
 dnl Process this file with autoconf to produce a configure script.
 AC_PREREQ(2.50)
@@ -7,7 +7,7 @@ AC_INIT(smartmontools, 5.38, smartmontools-support@lists.sourceforge.net)
 AC_CONFIG_SRCDIR(smartctl.cpp)
 
 smartmontools_configure_date=`date -u +"%Y/%m/%d %T %Z"`
-smartmontools_cvs_tag=`echo '$Id: configure.in,v 1.127 2007/11/13 14:53:27 jhering Exp $'`
+smartmontools_cvs_tag=`echo '$Id: configure.in,v 1.128 2007/12/08 17:11:11 shattered Exp $'`
 smartmontools_release_date=2006/12/20
 smartmontools_release_time="20:37:59 UTC"
 
@@ -140,7 +140,7 @@ case "${host}" in
 	*-*-linux*)
 		AC_SUBST([os_deps], ['os_linux.o cciss.o']) 
 		AC_SUBST([os_libs], ['']) ;;
-	*-*-freebsd*)
+	*-*-freebsd*|*-*-dragonfly*)
 		AC_SUBST([os_deps], ['os_freebsd.o cciss.o']) 
 		AC_SUBST([os_libs], ['-lcam']);;
 	sparc-*-solaris*) 
diff --git a/sm5/os_freebsd.cpp b/sm5/os_freebsd.cpp
index 9640a6a1d..4da7b7f41 100644
--- a/sm5/os_freebsd.cpp
+++ b/sm5/os_freebsd.cpp
@@ -22,7 +22,11 @@
 #include <err.h>
 #include <camlib.h>
 #include <cam/scsi/scsi_message.h>
+#if defined(__DragonFly__)
+#include <sys/nata.h>
+#else
 #include <sys/ata.h>
+#endif
 #include <sys/stat.h>
 #include <unistd.h>
 #include <fcntl.h>
@@ -40,9 +44,9 @@
 #include "extern.h"
 #include "os_freebsd.h"
 
-static const char *filenameandversion="$Id: os_freebsd.cpp,v 1.54 2007/09/06 08:48:55 ballen4705 Exp $";
+static const char *filenameandversion="$Id: os_freebsd.cpp,v 1.55 2007/12/08 17:11:11 shattered Exp $";
 
-const char *os_XXXX_c_cvsid="$Id: os_freebsd.cpp,v 1.54 2007/09/06 08:48:55 ballen4705 Exp $" \
+const char *os_XXXX_c_cvsid="$Id: os_freebsd.cpp,v 1.55 2007/12/08 17:11:11 shattered Exp $" \
 ATACMDS_H_CVSID CONFIG_H_CVSID INT64_H_CVSID OS_FREEBSD_H_CVSID SCSICMDS_H_CVSID UTILITY_H_CVSID;
 
 // to hold onto exit code for atexit routine
-- 
GitLab