Sorry, that's not how extension detection works. The presence of the extension in the driver is not indicated by the cl_ext.h header file -- all possible extensions are listed there and detection happens during program execution. An extension is supported when it is returned in the string from the glGetDeviceInfo function call:
char extensions[1024];
clGetDeviceInfo(device, CL_DEVICE_EXTENSIONS, sizeof(extensions), extensions, NULL);
printf("CL_DEVICE_EXTENSIONS: %s\n", extensions);
if (strstr(extensions, "cl_khr_external_memory_dma_buf") == NULL) {
// Handle error: DMA-BUF extension not supported
}
Either the documentation is wrong, or the extensions list in the driver is wrong.