Browse Source

libarchive: avoid lchmod not implemented warning on old LCC

makise-homura 2 years ago
parent
commit
1dbb31cea2
1 changed files with 3 additions and 1 deletions
  1. 3 1
      Utilities/cmlibarchive/CMakeLists.txt

+ 3 - 1
Utilities/cmlibarchive/CMakeLists.txt

@@ -1425,7 +1425,9 @@ CHECK_FUNCTION_EXISTS_GLIBC(getpid HAVE_GETPID)
 CHECK_FUNCTION_EXISTS_GLIBC(getvfsbyname HAVE_GETVFSBYNAME)
 CHECK_FUNCTION_EXISTS_GLIBC(gmtime_r HAVE_GMTIME_R)
 CHECK_FUNCTION_EXISTS_GLIBC(lchflags HAVE_LCHFLAGS)
-CHECK_FUNCTION_EXISTS_GLIBC(lchmod HAVE_LCHMOD)
+if(NOT CMAKE_C_COMPILER_ID STREQUAL "LCC" OR NOT CMAKE_C_COMPILER_VERSION VERSION_LESS_EQUAL "1.23")
+  CHECK_FUNCTION_EXISTS_GLIBC(lchmod HAVE_LCHMOD)
+endif()
 CHECK_FUNCTION_EXISTS_GLIBC(lchown HAVE_LCHOWN)
 CHECK_FUNCTION_EXISTS_GLIBC(link HAVE_LINK)
 CHECK_FUNCTION_EXISTS_GLIBC(linkat HAVE_LINKAT)