From 197a1f95ffbd1986b36b13c0593d9188b8d1dc43 Mon Sep 17 00:00:00 2001 From: Jason Tibbitts Date: Mon, 23 Sep 2019 12:10:02 -0500 Subject: [PATCH] Relocate declaration of stl_internal_reverse_quads On little-endian hosts, stl_internal_reverse_quads will be called before it is declared. Move the declaration up to the beginning of the file to fix build breakage seen on an s390x host. --- src/admesh/stlinit.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/admesh/stlinit.cpp b/src/admesh/stlinit.cpp index 693aad086..390fe56a4 100644 --- a/src/admesh/stlinit.cpp +++ b/src/admesh/stlinit.cpp @@ -36,6 +36,10 @@ #error "SEEK_SET not defined" #endif +#ifndef BOOST_LITTLE_ENDIAN +extern void stl_internal_reverse_quads(char *buf, size_t cnt); +#endif /* BOOST_LITTLE_ENDIAN */ + static FILE* stl_open_count_facets(stl_file *stl, const char *file) { // Open the file in binary mode first. @@ -238,10 +242,6 @@ bool stl_open(stl_file *stl, const char *file) return result; } -#ifndef BOOST_LITTLE_ENDIAN -extern void stl_internal_reverse_quads(char *buf, size_t cnt); -#endif /* BOOST_LITTLE_ENDIAN */ - void stl_allocate(stl_file *stl) { // Allocate memory for the entire .STL file.