From 91b119f282fa7dae8cbeb6a293d75c8122aff7b8 Mon Sep 17 00:00:00 2001 From: wang_yue111 <648774160@qq.com> Date: Sat, 26 Jun 2021 16:12:08 +0800 Subject: [PATCH] Remove sysctl.h to fix build error --- irrlicht.spec | 6 +++++- remove-sysctl.h.patch | 31 +++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 remove-sysctl.h.patch diff --git a/irrlicht.spec b/irrlicht.spec index 033f584..376a9bb 100644 --- a/irrlicht.spec +++ b/irrlicht.spec @@ -1,7 +1,7 @@ Name: irrlicht Summary: A high performance and free realtime 3D engine Version: 1.8.4 -Release: 11 +Release: 12 License: zlib URL: http://irrlicht.sourceforge.net/ Source0: http://downloads.sourceforge.net/irrlicht/irrlicht-1.8.4.zip @@ -10,6 +10,7 @@ Patch0002: irrlicht-1.8-glext.patch Patch0003: irrlicht18-libaesgm.patch Patch0004: irrlicht-1.8-irrXML-shared-library.patch Patch0005: irrlicht-1.8-fix-locale-decimal-points.patch +Patch0006: remove-sysctl.h.patch BuildRequires: gcc-c++ libXxf86vm-devel mesa-libGL-devel mesa-libGLU-devel BuildRequires: libjpeg-devel zlib-devel libaesgm-devel libpng-devel bzip2-devel Provides: irrlicht18 = %{version}-%{release} @@ -103,6 +104,9 @@ popd %{_includedir}/irrlicht/{fast_atof.h,heapsort.h,irrArray.h,irrString.h,irrTypes.h,irrXML.h} %changelog +* Sat Jun 26 2021 wangyue - 1.8.4-12 +- Remove sysctl.h to fix build error + * Mon Mar 09 2020 xuxijian - 1.8.4-11 - Add libIrrXML patch files diff --git a/remove-sysctl.h.patch b/remove-sysctl.h.patch new file mode 100644 index 0000000..5094d8a --- /dev/null +++ b/remove-sysctl.h.patch @@ -0,0 +1,31 @@ +From 5382142d37730f6758753b758c91e257ffd5892c Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Sun, 9 Apr 2017 22:20:19 +0200 +Subject: [PATCH] remove sys/sysctl.h + +With musl irrlicht doesn't build due to missing sys/sysctl.h + +fatal error: sys/sysctl.h: No such file or directory + +From [1] +"sysctl does not work, and NEVER worked. using it is bogus. +it was a bogus experimental syscall that was deprecated before +it was ever used (basically, a broken binary version of +/proc/sys, without any stability between kernel versions for +what the binary constants meant)." + +[1] https://devsonacid.wordpress.com/tag/musl/ + +Signed-off-by: Romain Naour + +diff -ruN irrlicht-1.8.4-bak/source/Irrlicht/COSOperator.cpp irrlicht-1.8.4/source/Irrlicht/COSOperator.cpp +--- irrlicht-1.8.4-bak/source/Irrlicht/COSOperator.cpp 2012-11-04 02:07:52.000000000 +0800 ++++ irrlicht-1.8.4/source/Irrlicht/COSOperator.cpp 2021-06-26 15:26:03.935312943 +0800 +@@ -13,7 +13,6 @@ + #include + #ifndef _IRR_SOLARIS_PLATFORM_ + #include +-#include + #endif + #endif +