1
0
wxWidgets-3_2/wxWidgets-3_2-fix-building-fault-S390.patch

54 lines
2.0 KiB
Diff
Raw Normal View History

diff -Nura wxWidgets-3.2.4/tests/file/filetest.cpp wxWidgets-3.2.4_new/tests/file/filetest.cpp
--- wxWidgets-3.2.4/tests/file/filetest.cpp 2023-11-09 06:53:55.000000000 +0800
+++ wxWidgets-3.2.4_new/tests/file/filetest.cpp 2024-01-03 16:59:53.793721314 +0800
@@ -153,6 +153,7 @@
CHECK( fileProc.ReadAll(&s) );
CHECK( !s.empty() );
+ if ( wxFile::Exists("/sys/power/state") ) {
// All files in /sys have the size of one kernel page, even if they don't
// have that much data in them.
const long pageSize = sysconf(_SC_PAGESIZE);
@@ -163,6 +164,7 @@
CHECK( fileSys.ReadAll(&s) );
CHECK( !s.empty() );
CHECK( s.length() < pageSize );
+ }
}
#endif // __LINUX__
diff -Nura wxWidgets-3.2.4/tests/filename/filenametest.cpp wxWidgets-3.2.4_new/tests/filename/filenametest.cpp
--- wxWidgets-3.2.4/tests/filename/filenametest.cpp 2023-11-09 06:53:55.000000000 +0800
+++ wxWidgets-3.2.4_new/tests/filename/filenametest.cpp 2024-01-03 17:00:36.881285813 +0800
@@ -1040,9 +1040,11 @@
INFO( "size of /proc/kcore=" << size );
CHECK( size > 0 );
+ if ( wxFile::Exists("/sys/power/state") ) {
// All files in /sys are one page in size, irrespectively of the size of
// their actual contents.
CHECK( wxFileName::GetSize("/sys/power/state") == sysconf(_SC_PAGESIZE) );
+ }
}
#endif // __LINUX__
diff -Nura wxWidgets-3.2.4/tests/textfile/textfiletest.cpp wxWidgets-3.2.4_new/tests/textfile/textfiletest.cpp
--- wxWidgets-3.2.4/tests/textfile/textfiletest.cpp 2024-01-03 16:57:28.265814711 +0800
+++ wxWidgets-3.2.4_new/tests/textfile/textfiletest.cpp 2024-01-03 17:01:18.854835722 +0800
@@ -348,6 +348,7 @@
CHECK( f.GetLineCount() > 1 );
}
+ if ( wxFile::Exists("/sys/power/state") ) {
SECTION("/sys")
{
if ( wxFile::Exists("/sys/power/state") ) {
@@ -358,6 +359,7 @@
CHECK( (f[0].find("mem") != wxString::npos || f[0].find("disk") != wxString::npos) );
}
}
+ }
}
#endif // __LINUX__