summaryrefslogtreecommitdiffstats
path: root/src/H5FDsec2.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5FDsec2.c')
-rw-r--r--src/H5FDsec2.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/H5FDsec2.c b/src/H5FDsec2.c
index ff3a2bb..fda1e81 100644
--- a/src/H5FDsec2.c
+++ b/src/H5FDsec2.c
@@ -390,8 +390,17 @@ H5FD_sec2_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
if (f1->fileindexlo > f2->fileindexlo) ret_value= 1;
#else
+#ifdef H5_DEV_T_IS_SCALAR
if (f1->device < f2->device) ret_value= -1;
if (f1->device > f2->device) ret_value= 1;
+#else /* H5_DEV_T_IS_SCALAR */
+ /* If dev_t isn't a scalar value on this system, just use memcmp to
+ * determine if the values are the same or not. The actual return value
+ * shouldn't really matter...
+ */
+ if(HDmemcmp(&(f1->device),&(f2->device),sizeof(dev_t))<0) ret_value= -1;
+ if(HDmemcmp(&(f1->device),&(f2->device),sizeof(dev_t))>0) ret_value= 1;
+#endif /* H5_DEV_T_IS_SCALAR */
if (f1->inode < f2->inode) ret_value= -1;
if (f1->inode > f2->inode) ret_value= 1;