diff options
author | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2015-11-18 23:29:14 +0100 |
---|---|---|
committer | Peter Korsgaard <peter@korsgaard.com> | 2015-11-19 10:44:18 +0100 |
commit | 154c3ea73206ee7115b1730cfa1aaaec50374c07 (patch) | |
tree | 3e02d2fd33ed49f6a963b1a9c2295eb406bf133b /package/slang | |
parent | fa4ae3e98dd53258a307ba83ef7c24e518db3556 (diff) |
slang: fix build on musl
Add patch from Alpine Linux to fix the build of slang with the musl C
library.
Fixes:
http://autobuild.buildroot.org/results/bc3/bc3cca6e6a906afa4c57dcddfb4a9ecd0cb44398/
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'package/slang')
-rw-r--r-- | package/slang/0004-Rename-posix_close-function-to-posix_close_slfile.patch | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/package/slang/0004-Rename-posix_close-function-to-posix_close_slfile.patch b/package/slang/0004-Rename-posix_close-function-to-posix_close_slfile.patch new file mode 100644 index 000000000..4b3c869a6 --- /dev/null +++ b/package/slang/0004-Rename-posix_close-function-to-posix_close_slfile.patch @@ -0,0 +1,47 @@ +From 055b02cf98ab9b7301988c3be2d277f262f0957e Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> +Date: Wed, 18 Nov 2015 23:12:15 +0100 +Subject: [PATCH] Rename posix_close() function to posix_close_slfile() + +posix_close() is a function that will be implemented as part of an +upcoming of the POSIX standard. For this reason, the musl C library +has already started implementing this function call. Unfortunately, +since slang already defines a function with the same name, it cannot +build properly with the musl C library. + +This commit fixes that by renaming the slang function to +posix_close_slfile(). + +This patch has been taken from the Alpine Linux repository, at +http://git.alpinelinux.org/cgit/aports/plain/main/slang/musl-fix-posix_close-clash.patch. + +Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> +--- + src/slposio.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/slposio.c b/src/slposio.c +index 94f20dd..475e2c9 100644 +--- a/src/slposio.c ++++ b/src/slposio.c +@@ -372,7 +372,7 @@ static int posix_close_fd (int *fd) + return 0; + } + +-static int posix_close (SLFile_FD_Type *f) ++static int posix_close_slfile (SLFile_FD_Type *f) + { + int status = do_close (f); + +@@ -1011,7 +1011,7 @@ static SLang_Intrin_Fun_Type Fd_Name_Table [] = + MAKE_INTRINSIC_2("write", posix_write, V, F, B), + MAKE_INTRINSIC_1("dup_fd", posix_dup, V, F), + MAKE_INTRINSIC_2("dup2_fd", posix_dup2, I, F, I), +- MAKE_INTRINSIC_1("close", posix_close, I, F), ++ MAKE_INTRINSIC_1("close", posix_close_slfile, I, F), + MAKE_INTRINSIC_1("_close", posix_close_fd, I, I), + #if defined(TTYNAME_R) + MAKE_INTRINSIC_0("ttyname", posix_ttyname, V), +-- +2.6.3 + |