All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [git commit] slang: fix build on musl
@ 2015-11-19  9:44 Peter Korsgaard
  0 siblings, 0 replies; only message in thread
From: Peter Korsgaard @ 2015-11-19  9:44 UTC (permalink / raw)
  To: buildroot

commit: http://git.buildroot.net/buildroot/commit/?id=154c3ea73206ee7115b1730cfa1aaaec50374c07
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master

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>
---
 ...osix_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 0000000..4b3c869
--- /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
+

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-11-19  9:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-19  9:44 [Buildroot] [git commit] slang: fix build on musl Peter Korsgaard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.