Skip to content

Commit

Permalink
libiconv: add support for iphoneos (#5655)
Browse files Browse the repository at this point in the history
* libiconv: add support for iphoneos

* `add_defines("O_BINARY=0")` for iphoneos
  • Loading branch information
Doekin authored Nov 3, 2024
1 parent b72caac commit 978015f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/l/libiconv/port/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion packages/l/libiconv/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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", "%$", "")
Expand Down

0 comments on commit 978015f

Please sign in to comment.