void-packages/srcpkgs/codelite/patches/musl.patch

57 lines
2.0 KiB
Diff

--- codelitegcc/main.cpp.orig 2019-06-29 08:37:38.818622077 +0200
+++ codelitegcc/main.cpp 2019-06-29 08:38:04.090937646 +0200
@@ -33,6 +33,7 @@ extern int ExecuteProcessWIN(const std::
#include <sys/file.h>
#include <sys/stat.h>
#include <sys/stat.h>
+#include <fcntl.h>
void WriteContent( const std::string& logfile, const std::string& filename, const std::string& flags )
{
--- sdk/codelite_indexer/libctags/read.c.orig 2019-06-29 08:54:26.592208449 +0200
+++ sdk/codelite_indexer/libctags/read.c 2019-06-29 08:56:18.688608501 +0200
@@ -605,6 +605,9 @@ extern int readChars (char *buffer, size
#if defined(__WXMSW__) || defined(__APPLE__) || defined(__FreeBSD__)
if(location < 0)
return 0;
+#elif defined(__linux__) && !defined(__GLIBC__) /* musl */
+ if(location.__lldata < 0)
+ return 0;
#else
if(location.__pos < 0)
return 0;
@@ -619,6 +622,8 @@ extern int readChars (char *buffer, size
#if defined(__WXMSW__) || defined(__APPLE__) || defined(__FreeBSD__)
sizeToRead = endPos - location;
+#elif defined(__linux__) && !defined(__GLIBC__) /* musl */
+ sizeToRead = endPos.__lldata - location.__lldata;
#else
sizeToRead = endPos.__pos - location.__pos;
#endif
--- sdk/codelite_indexer/network/named_pipe.cpp.orig 2019-06-29 09:06:20.260132366 +0200
+++ sdk/codelite_indexer/network/named_pipe.cpp 2019-06-29 09:06:38.468360112 +0200
@@ -27,9 +27,9 @@
#ifndef __WXMSW__
# include <sys/types.h>
-# include <sys/unistd.h>
# include <sys/socket.h>
# include <sys/time.h>
+# include <unistd.h>
#endif
#ifdef __WXMSW__
--- sdk/codelite_indexer/network/named_pipe_server.cpp.orig 2019-06-29 09:07:26.077955618 +0200
+++ sdk/codelite_indexer/network/named_pipe_server.cpp 2019-06-29 09:07:35.484073269 +0200
@@ -26,8 +26,8 @@
#include "named_pipe_server.h"
#ifndef __WXMSW__
# include <sys/types.h>
-# include <sys/unistd.h>
# include <sys/socket.h>
+# include <unistd.h>
#endif
clNamedPipeServer::clNamedPipeServer(const char* pipePath)
: clNamedPipe(pipePath)