diff --git a/Changelog.md b/Changelog.md
--- a/Changelog.md
+++ b/Changelog.md
@@ -1,3 +1,15 @@
+1.8.16 [2026-09-02]
+------
+
+[Philipp Middendorf]
+* fix compilation with H5_HAVE_DIRECT enabled
+
+[Joshua Chia]
+* Fix HDF5 < 1.12 compatibility in H5Oget_info bindings
+
+[Picca Frédéric-Emmanuel]
+* fix compilation with hdf5 2.X thanks to Gilles Filippini
+
 1.8.15 [2025-09-04]
 ------
 
diff --git a/hdf5.cabal b/hdf5.cabal
--- a/hdf5.cabal
+++ b/hdf5.cabal
@@ -1,5 +1,5 @@
 name:                   hdf5
-version:                1.8.15
+version:                1.8.16
 stability:              provisional
 
 cabal-version:          >= 1.10
@@ -21,7 +21,7 @@
 
 source-repository head
   type: git
-  location: git://github.com/picca/hs-hdf5.git
+  location: https://github.com/picca/hs-hdf5.git
 
 flag use-hdf5-serial
   default: False
diff --git a/src/Bindings/HDF5/Raw/H5FD/Core.hsc b/src/Bindings/HDF5/Raw/H5FD/Core.hsc
--- a/src/Bindings/HDF5/Raw/H5FD/Core.hsc
+++ b/src/Bindings/HDF5/Raw/H5FD/Core.hsc
@@ -15,15 +15,17 @@
 
 import Foreign.Ptr.Conventions
 
-#mangle_ident "H5FD_CORE"
+#if defined(H5FD_core_init)
+# mangle_ident "H5FD_CORE"
   :: HId_t
-#mangle_ident "H5FD_CORE"
+# mangle_ident "H5FD_CORE"
     = unsafePerformIO (#mangle_ident "H5FD_core_init")
 
 -- |Initialize this driver by registering the driver with the library.
 --
 -- > hid_t H5FD_core_init(void);x
-#ccall H5FD_core_init, IO <hid_t>
+# ccall H5FD_core_init, IO <hid_t>
+#endif
 
 #if H5_VERSION_LE(1,8,18)
 -- |Shut down the VFD.
diff --git a/src/Bindings/HDF5/Raw/H5FD/Direct.hsc b/src/Bindings/HDF5/Raw/H5FD/Direct.hsc
--- a/src/Bindings/HDF5/Raw/H5FD/Direct.hsc
+++ b/src/Bindings/HDF5/Raw/H5FD/Direct.hsc
@@ -9,6 +9,10 @@
 import Bindings.HDF5.Raw.H5I
 #ifdef H5_HAVE_DIRECT
 import System.IO.Unsafe(unsafePerformIO)
+import Foreign.Ptr
+import Bindings.HDF5.Raw.H5
+import Foreign.C.Types
+import Foreign.Ptr.Conventions
 #endif /* H5_HAVE_DIRECT */
 
 #mangle_ident "H5FD_DIRECT"
diff --git a/src/Bindings/HDF5/Raw/H5FD/Family.hsc b/src/Bindings/HDF5/Raw/H5FD/Family.hsc
--- a/src/Bindings/HDF5/Raw/H5FD/Family.hsc
+++ b/src/Bindings/HDF5/Raw/H5FD/Family.hsc
@@ -25,15 +25,17 @@
 import Bindings.HDF5.Raw.H5I
 import Foreign.Ptr.Conventions
 
-#mangle_ident "H5FD_FAMILY"
+#if defined(H5FD_family_init)
+# mangle_ident "H5FD_FAMILY"
   :: HId_t
-#mangle_ident "H5FD_FAMILY"
+# mangle_ident "H5FD_FAMILY"
     = unsafePerformIO (#mangle_ident "H5FD_family_init")
 
 -- |Initialize this driver by registering the driver with the library.
 --
 -- > hid_t H5FD_family_init(void);
-#ccall H5FD_family_init, IO <hid_t>
+# ccall H5FD_family_init, IO <hid_t>
+#endif
 
 #if H5_VERSION_LE(1,8,18)
 -- |Shut down the VFD.
diff --git a/src/Bindings/HDF5/Raw/H5FD/Log.hsc b/src/Bindings/HDF5/Raw/H5FD/Log.hsc
--- a/src/Bindings/HDF5/Raw/H5FD/Log.hsc
+++ b/src/Bindings/HDF5/Raw/H5FD/Log.hsc
@@ -18,10 +18,12 @@
 import Bindings.HDF5.Raw.H5
 import Bindings.HDF5.Raw.H5I
 
-#mangle_ident "H5FD_LOG"
+#if defined(H5FD_family_init)
+# mangle_ident "H5FD_LOG"
   :: HId_t
-#mangle_ident "H5FD_LOG"
+# mangle_ident "H5FD_LOG"
     = unsafePerformIO (#mangle_ident "H5FD_log_init")
+#endif
 
 -- * Flags for 'h5p_set_fapl_log'
 
@@ -62,7 +64,9 @@
 -- |Initialize this driver by registering the driver with the library.
 --
 -- > hid_t H5FD_log_init(void);
-#ccall H5FD_log_init, IO <hid_t>
+#if defined(H5FD_family_init)
+# ccall H5FD_log_init, IO <hid_t>
+#endif
 
 #if H5_VERSION_LE(1,8,18)
 -- |Shut down the VFD.
diff --git a/src/Bindings/HDF5/Raw/H5FD/Multi.hsc b/src/Bindings/HDF5/Raw/H5FD/Multi.hsc
--- a/src/Bindings/HDF5/Raw/H5FD/Multi.hsc
+++ b/src/Bindings/HDF5/Raw/H5FD/Multi.hsc
@@ -16,9 +16,10 @@
 import Bindings.HDF5.Raw.H5FD
 import Foreign.Ptr.Conventions
 
-#mangle_ident "H5FD_MULTI"
+#if defined(H5FD_multi_init)
+# mangle_ident "H5FD_MULTI"
   :: HId_t
-#mangle_ident "H5FD_MULTI"
+# mangle_ident "H5FD_MULTI"
     = unsafePerformIO (#mangle_ident "H5FD_multi_init")
 
 -- |Initialize this driver by registering the driver with the library.
@@ -27,7 +28,8 @@
 -- returns a negative value.
 --
 -- > hid_t H5FD_multi_init(void);
-#ccall H5FD_multi_init, IO <hid_t>
+# ccall H5FD_multi_init, IO <hid_t>
+#endif
 
 #if H5_VERSION_LE(1,8,18)
 -- Shut down the VFD
diff --git a/src/Bindings/HDF5/Raw/H5FD/Sec2.hsc b/src/Bindings/HDF5/Raw/H5FD/Sec2.hsc
--- a/src/Bindings/HDF5/Raw/H5FD/Sec2.hsc
+++ b/src/Bindings/HDF5/Raw/H5FD/Sec2.hsc
@@ -15,15 +15,17 @@
 import Bindings.HDF5.Raw.H5
 import Bindings.HDF5.Raw.H5I
 
-#mangle_ident "H5FD_SEC2"
+#if defined(H5FD_sec2_init)
+# mangle_ident "H5FD_SEC2"
   :: HId_t
-#mangle_ident "H5FD_SEC2"
+# mangle_ident "H5FD_SEC2"
     = unsafePerformIO (#mangle_ident "H5FD_sec2_init")
 
 -- |Initialize this driver by registering the driver with the library.
 --
 -- > hid_t H5FD_sec2_init(void);
-#ccall H5FD_sec2_init, IO <hid_t>
+# ccall H5FD_sec2_init, IO <hid_t>
+#endif
 
 #if H5_VERSION_LE(1,8,18)
 -- |Shut down the VFD.
diff --git a/src/Bindings/HDF5/Raw/H5FD/StdIO.hsc b/src/Bindings/HDF5/Raw/H5FD/StdIO.hsc
--- a/src/Bindings/HDF5/Raw/H5FD/StdIO.hsc
+++ b/src/Bindings/HDF5/Raw/H5FD/StdIO.hsc
@@ -9,15 +9,17 @@
 import Bindings.HDF5.Raw.H5
 import Bindings.HDF5.Raw.H5I
 
-#mangle_ident "H5FD_STDIO"
+#if defined(H5FD_stdio_init)
+# mangle_ident "H5FD_STDIO"
   :: HId_t
-#mangle_ident "H5FD_STDIO"
+# mangle_ident "H5FD_STDIO"
     = unsafePerformIO (#mangle_ident "H5FD_stdio_init")
 
 -- |Initialize this driver by registering the driver with the library.
 --
 -- > hid_t H5FD_stdio_init(void);
-#ccall H5FD_stdio_init, IO <hid_t>
+# ccall H5FD_stdio_init, IO <hid_t>
+#endif
 
 #if H5_VERSION_LE(1,8,18)
 
diff --git a/src/Bindings/HDF5/Raw/H5O.hsc b/src/Bindings/HDF5/Raw/H5O.hsc
--- a/src/Bindings/HDF5/Raw/H5O.hsc
+++ b/src/Bindings/HDF5/Raw/H5O.hsc
@@ -513,8 +513,8 @@
 -- H5Oget_info
 
 #if defined(H5Oget_info_vers)
-# ccall H5Oget_info1, <hid_t> -> Out <H5O_info1_t> -> IO <herr_t>
-# ccall H5Oget_info2, <hid_t> -> Out <H5O_info1_t> -> CUInt -> IO <herr_t>
+# ccall H5Oget_info1, <hid_t> -> Out <H5O_info_t> -> IO <herr_t>
+# ccall H5Oget_info2, <hid_t> -> Out <H5O_info_t> -> CUInt -> IO <herr_t>
 # if H5Oget_info_vers == 1
 h5o_get_info :: HId_t -> Out H5O_info_t -> IO HErr_t
 h5o_get_info = h5o_get_info1
diff --git a/src/Bindings/HDF5/Raw/H5T.hsc b/src/Bindings/HDF5/Raw/H5T.hsc
--- a/src/Bindings/HDF5/Raw/H5T.hsc
+++ b/src/Bindings/HDF5/Raw/H5T.hsc
@@ -694,7 +694,22 @@
 -- or negative on failure.
 --
 -- > hid_t H5Tdecode(const void *buf);
-#ccall H5Tdecode, InArray a -> IO <hid_t>
+
+#if defined(H5Tdecode_vers)
+# ccall H5Tdecode1, InArray a -> IO <hid_t>
+# ccall H5Tdecode2, InArray a -> <size_t> -> IO <hid_t>
+# if H5Tdecode_vers == 1
+h5t_decode :: InArray a -> IO HId_t
+h5t_decode = h5t_decode1
+# elif H5Tdecode_vers == 2
+h5t_decode :: InArray a -> CSize -> IO HId_t
+h5t_decode = h5t_decode2
+# else
+#  error TODO
+# endif
+#else
+# ccall H5Tdecode, InArray a -> IO <hid_t>
+#endif
 
 -- > herr_t H5Tflush(hid_t type_id);
 #ccall H5Tflush, <hid_t> -> IO <herr_t>
