MINGW-packages/mingw-w64-hdf5/0002-dynamic-allocation-functions.patch
2024-10-29 18:23:45 +01:00

18 lines
650 B
Diff

To enable Dynamic Allocation Functions, features from ISO/IEC TR 24731-2:2010,
the macro __STDC_WANT_LIB_EXT2__ hs to be defined to 1 before to the stdio.h
header is included.
diff -urN hdf5-1.14.5/src/H5private.h.orig hdf5-1.14.5/src/H5private.h
--- hdf5-1.14.5/src/H5private.h.orig 2024-09-30 18:07:53.000000000 +0200
+++ hdf5-1.14.5/src/H5private.h 2024-10-29 17:09:55.936592100 +0100
@@ -20,6 +20,9 @@
#ifndef H5private_H
#define H5private_H
+#define __STDC_WANT_LIB_EXT2__ 1 // define for TR 24731-2:2010 extensions (e.g., vasprintf)
+#define _GNU_SOURCE
+
#include "H5public.h" /* Include Public Definitions */
#include <assert.h>