]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
fixes on i386
authorsageweil <sageweil@29311d96-e01e-0410-9327-a35deaab8ce9>
Wed, 17 Oct 2007 17:32:39 +0000 (17:32 +0000)
committersageweil <sageweil@29311d96-e01e-0410-9327-a35deaab8ce9>
Wed, 17 Oct 2007 17:32:39 +0000 (17:32 +0000)
git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@1956 29311d96-e01e-0410-9327-a35deaab8ce9

trunk/ceph/include/ceph_fs.h
trunk/ceph/include/types.h
trunk/ceph/msg/Message.h

index 9b6217c5d4662e33252acc8115479e2968c2b23d..ede0663a7915844b110bc8564c0e0ccccf9b4b35 100644 (file)
@@ -54,7 +54,7 @@ struct ceph_file_layout {
        __u32 fl_object_stripe_unit;   /* for per-object raid */
 
        /* object -> pg layout */
-       __u32 fl_pg_preferred; /* preferred primary for pg */
+       __s32 fl_pg_preferred; /* preferred primary for pg */
        __u8  fl_pg_type;      /* pg type; see PG_TYPE_* */
        __u8  fl_pg_size;      /* pg size (num replicas, raid stripe width, etc. */
 };
index bf84575ad31d67f6f3ca430545c9a79b31b322af..cf8374d329a774759e7b1f9e12f2bae99014e16f 100644 (file)
@@ -62,6 +62,22 @@ namespace __gnu_cxx {
       return H(x.c_str());
     }
   };
+
+#ifndef __LP64__
+  template<> struct hash<int64_t> {
+    size_t operator()(int64_t __x) const { 
+      static hash<int32_t> H;
+      return H((__x >> 32) ^ (__x & 0xffffffff)); 
+    }
+  };
+  template<> struct hash<uint64_t> {
+    size_t operator()(uint64_t __x) const { 
+      static hash<uint32_t> H;
+      return H((__x >> 32) ^ (__x & 0xffffffff)); 
+    }
+  };
+#endif
+
 }
 
 
index a0de9a24ddab7be7381ca39c41c6e1f673ba6c9b..9f0175e7a7d1e2f7a32547f5212fbda43f19edb8 100644 (file)
@@ -174,11 +174,11 @@ public:
 
  public:
   Message() { 
-    env.source_port = env.dest_port = -1;
+    env.source_port = env.dest_port = 0;
     env.nchunks = 0;
   };
   Message(int t) {
-    env.source_port = env.dest_port = -1;
+    env.source_port = env.dest_port = 0;
     env.nchunks = 0;
     env.type = t;
   }