trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From iga...@apache.org
Subject [1/2] git commit: TS-207: Fix the Darwin build
Date Mon, 21 Jan 2013 21:54:40 GMT
TS-207: Fix the Darwin build


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/65c4efcd
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/65c4efcd
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/65c4efcd

Branch: refs/heads/3.2.x
Commit: 65c4efcdac87d7bccaabb67b4c3111c9dffc3a86
Parents: 6e64251
Author: James Peach <jpeach@apache.org>
Authored: Fri Nov 2 20:28:57 2012 -0700
Committer: Igor Galić <i.galic@brainsware.org>
Committed: Mon Jan 21 22:52:51 2013 +0100

----------------------------------------------------------------------
 iocore/cache/Store.cc |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/65c4efcd/iocore/cache/Store.cc
----------------------------------------------------------------------
diff --git a/iocore/cache/Store.cc b/iocore/cache/Store.cc
index dd84298..2935f53 100644
--- a/iocore/cache/Store.cc
+++ b/iocore/cache/Store.cc
@@ -444,6 +444,8 @@ Span::init(char *an, int64_t size)
 
   case S_IFBLK:{
   case S_IFCHR:
+    // These IOCTLs are standard across the BSD family; Darwin has a different set though.
+#if defined(DIOCGMEDIASIZE) && defined(DIOCGSECTORSIZE)
       if (ioctl(fd, DIOCGMEDIASIZE, &size) < 0) {
         Warning("unable to get disk information for '%s': %s", n, strerror(errno));
         err = "unable to get label information";
@@ -456,6 +458,11 @@ Span::init(char *an, int64_t size)
       }
       devnum = s.st_rdev;
       break;
+#else
+      Warning("unable to get disk information for '%s': %s", n, strerror(errno));
+      err = "no raw disk support on this platform";
+      goto Lfail;
+#endif
     }
   case S_IFDIR:
   case S_IFREG:


Mime
View raw message