diff --git a/src/c_wrapper/pyopencl_ext.h b/src/c_wrapper/pyopencl_ext.h
index 48e9444c540b10afc5dd4b70720644b1f7276415..4b5e7871e57d7c26a89830e5bc5bec4bb1c8667c 100644
--- a/src/c_wrapper/pyopencl_ext.h
+++ b/src/c_wrapper/pyopencl_ext.h
@@ -16,6 +16,16 @@
 #include <CL/cl.h>
 #include <CL/cl_ext.h>
 
+#ifndef CL_DEVICE_TOPOLOGY_TYPE_PCIE_AMD
+#define CL_DEVICE_TOPOLOGY_TYPE_PCIE_AMD        1
+
+typedef union
+{
+    struct { cl_uint type; cl_uint data[5]; } raw;
+    struct { cl_uint type; cl_char unused[17]; cl_char bus; cl_char device; cl_char function; } pcie;
+} cl_device_topology_amd;
+#endif
+
 #endif
 
 #endif