Browse Source

libiconv: add support for iphoneos (#5655)

* libiconv: add support for iphoneos

* `add_defines("O_BINARY=0")` for iphoneos
Doekin 10 months ago
parent
commit
978015f8b3
2 changed files with 3 additions and 3 deletions
  1. 2 2
      packages/l/libiconv/port/xmake.lua
  2. 1 1
      packages/l/libiconv/xmake.lua

+ 2 - 2
packages/l/libiconv/port/xmake.lua

@@ -97,7 +97,7 @@ set_configvar("GNULIB_TEST_REALPATH", 1)
 set_configvar("GNULIB_TEST_SIGPROCMASK", 1)
 set_configvar("GNULIB_TEST_STAT", 1)
 set_configvar("GNULIB_TEST_STRERROR", 1)
-if not is_plat("android") then
+if not is_plat("android", "iphoneos") then
     set_configvar("ssize_t", "int", {quote = false})
     set_configvar("uid_t", "int", {quote = false})
 end
@@ -260,7 +260,7 @@ target("iconv_no_i18n")
     end
     add_files("src/iconv_no_i18n.c")
 
-    if is_plat("android") then
+    if is_plat("android", "iphoneos") then
         -- Gnulib defines these macros to 0 on GNU and other platforms that do not distinguish between text and binary I/O.
         -- https://www.gnu.org/software/gnulib/manual/html_node/fcntl_002eh.html
         add_defines("O_BINARY=0")

+ 1 - 1
packages/l/libiconv/xmake.lua

@@ -31,7 +31,7 @@ package("libiconv")
         package:addenv("PATH", "bin")
     end)
 
-    on_install("windows", "mingw", "android", function (package)
+    on_install("windows", "mingw", "android", "iphoneos", function (package)
         io.gsub("config.h.in", "%$", "")
         io.gsub("config.h.in", "# ?undef (.-)\n", "${define %1}\n")
         io.gsub("libcharset/config.h.in", "%$", "")