summaryrefslogtreecommitdiff
path: root/sci-libs/netcdf/files/netcdf-4.7.4-big-endian-test.patch
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-03-03 10:28:17 +0000
committerV3n3RiX <venerix@redcorelinux.org>2021-03-03 10:28:17 +0000
commitd99093fb4bb5652015c06274d64083daa2439e4f (patch)
treecf61513204d97974179580065e85df5c8009087c /sci-libs/netcdf/files/netcdf-4.7.4-big-endian-test.patch
parent463397cf1e064185110fe57c568d73f99a06f5d1 (diff)
gentoo resync : 03.03.2021
Diffstat (limited to 'sci-libs/netcdf/files/netcdf-4.7.4-big-endian-test.patch')
-rw-r--r--sci-libs/netcdf/files/netcdf-4.7.4-big-endian-test.patch16
1 files changed, 16 insertions, 0 deletions
diff --git a/sci-libs/netcdf/files/netcdf-4.7.4-big-endian-test.patch b/sci-libs/netcdf/files/netcdf-4.7.4-big-endian-test.patch
new file mode 100644
index 000000000000..cdc39a6a7729
--- /dev/null
+++ b/sci-libs/netcdf/files/netcdf-4.7.4-big-endian-test.patch
@@ -0,0 +1,16 @@
+Fixes ncdump_tst_netcdf4 test failure on big endian.
+https://github.com/Unidata/netcdf-c/issues/1896
+diff --git a/ncdump/tst_special_atts.c b/ncdump/tst_special_atts.c
+index 9655b86..e71cb7e 100644
+--- a/ncdump/tst_special_atts.c
++++ b/ncdump/tst_special_atts.c
+@@ -145,6 +145,10 @@ main(int argc, char **argv)
+ /* Set _Storage as compact */
+ if (nc_def_var_chunking(ncid, var6id, NC_COMPACT, NULL)) ERR;
+ if (nc_def_var_chunking(ncid, var7id, NC_COMPACT, NULL)) ERR;
++#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
++ if (nc_def_var_endian(ncid, var6id, NC_ENDIAN_LITTLE)) ERR;
++ if (nc_def_var_endian(ncid, var7id, NC_ENDIAN_LITTLE)) ERR;
++#endif
+
+ if (nc_enddef(ncid)) ERR;