python-dataproperty: bump version to 0.17.0
[buildroot-gz.git] / package / slang / 0004-Rename-posix_close-function-to-posix_close_slfile.patch
blob4b3c869a60b5a805d8e052205946214632f4c51e
1 From 055b02cf98ab9b7301988c3be2d277f262f0957e Mon Sep 17 00:00:00 2001
2 From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
3 Date: Wed, 18 Nov 2015 23:12:15 +0100
4 Subject: [PATCH] Rename posix_close() function to posix_close_slfile()
6 posix_close() is a function that will be implemented as part of an
7 upcoming of the POSIX standard. For this reason, the musl C library
8 has already started implementing this function call. Unfortunately,
9 since slang already defines a function with the same name, it cannot
10 build properly with the musl C library.
12 This commit fixes that by renaming the slang function to
13 posix_close_slfile().
15 This patch has been taken from the Alpine Linux repository, at
16 http://git.alpinelinux.org/cgit/aports/plain/main/slang/musl-fix-posix_close-clash.patch.
18 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
19 ---
20 src/slposio.c | 4 ++--
21 1 file changed, 2 insertions(+), 2 deletions(-)
23 diff --git a/src/slposio.c b/src/slposio.c
24 index 94f20dd..475e2c9 100644
25 --- a/src/slposio.c
26 +++ b/src/slposio.c
27 @@ -372,7 +372,7 @@ static int posix_close_fd (int *fd)
28 return 0;
31 -static int posix_close (SLFile_FD_Type *f)
32 +static int posix_close_slfile (SLFile_FD_Type *f)
34 int status = do_close (f);
36 @@ -1011,7 +1011,7 @@ static SLang_Intrin_Fun_Type Fd_Name_Table [] =
37 MAKE_INTRINSIC_2("write", posix_write, V, F, B),
38 MAKE_INTRINSIC_1("dup_fd", posix_dup, V, F),
39 MAKE_INTRINSIC_2("dup2_fd", posix_dup2, I, F, I),
40 - MAKE_INTRINSIC_1("close", posix_close, I, F),
41 + MAKE_INTRINSIC_1("close", posix_close_slfile, I, F),
42 MAKE_INTRINSIC_1("_close", posix_close_fd, I, I),
43 #if defined(TTYNAME_R)
44 MAKE_INTRINSIC_0("ttyname", posix_ttyname, V),
45 --
46 2.6.3