[irrlicht] Patch moved sysctl.h header file (#13137)

Sysctl has been deprecated for a while and in newer versions of glibc it
is removed which leads to a compilation error on modern Linux. This is
fixed in SVN trunk of irrlich so I copied the include guards from there.
In this case sysctl headers are only loaded for OS X where they are also
actually used.
This commit is contained in:
Jonas Karlsson 2020-08-25 23:47:28 +02:00 committed by GitHub
parent 05635bdf78
commit 58fc7e5c01
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 2 deletions

View File

@ -0,0 +1,12 @@
--- a/source/Irrlicht/COSOperator.cpp
+++ b/source/Irrlicht/COSOperator.cpp
@@ -11,8 +11,8 @@
#else
#include <string.h>
#include <unistd.h>
-#ifndef _IRR_SOLARIS_PLATFORM_
#include <sys/types.h>
+#ifdef _IRR_OSX_PLATFORM_
#include <sys/sysctl.h>
#endif
#endif

View File

@ -6,7 +6,7 @@ vcpkg_from_sourceforge(
REF 1.8/1.8.4
FILENAME "irrlicht-1.8.4.zip"
SHA512 de69ddd2c6bc80a1b27b9a620e3697b1baa552f24c7d624076d471f3aecd9b15f71dce3b640811e6ece20f49b57688d428e3503936a7926b3e3b0cc696af98d1
PATCHES fix-encoding.patch
PATCHES fix-encoding.patch fix-sysctl.patch
)
configure_file(${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt ${SOURCE_PATH}/CMakeLists.txt COPYONLY)
@ -45,4 +45,4 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/irrlicht)
endif()
file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)