void-packages/srcpkgs/codelite/patches/musl.patch
2020-07-06 22:07:38 +02:00

56 lines
1.8 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
+++ sdk/codelite_indexer/libctags/read.c
@@ -608,6 +608,9 @@
#elif defined(__NetBSD__)
if(location._pos < 0)
return 0;
+#elif defined(__linux__) && !defined(__GLIBC__) /* musl */
+ if(location.__lldata < 0)
+ return 0;
#else
if(location.__pos < 0)
return 0;
@@ -624,6 +627,8 @@
sizeToRead = endPos - location;
#elif defined(__NetBSD__)
sizeToRead = endPos._pos - location._pos;
+#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)