aboutsummaryrefslogtreecommitdiffstats
path: root/unmaintained/ptlib/musl-fixes.patch
diff options
context:
space:
mode:
Diffstat (limited to 'unmaintained/ptlib/musl-fixes.patch')
-rw-r--r--unmaintained/ptlib/musl-fixes.patch70
1 files changed, 70 insertions, 0 deletions
diff --git a/unmaintained/ptlib/musl-fixes.patch b/unmaintained/ptlib/musl-fixes.patch
new file mode 100644
index 0000000000..a0819c89d5
--- /dev/null
+++ b/unmaintained/ptlib/musl-fixes.patch
@@ -0,0 +1,70 @@
+--- ./include/ptlib/unix/ptlib/pmachdep.h.orig
++++ ./include/ptlib/unix/ptlib/pmachdep.h
+@@ -51,7 +51,7 @@
+
+ #define HAS_IFREQ
+
+-#if __GNU_LIBRARY__ < 6
++#if defined(__GNU_LIBRARY__) && __GNU_LIBRARY__ < 6
+ #define P_LINUX_LIB_OLD
+ typedef int socklen_t;
+ #endif
+--- ./src/ptlib/unix/pipechan.cxx.orig
++++ ./src/ptlib/unix/pipechan.cxx
+@@ -44,7 +44,7 @@
+ #include <signal.h>
+
+ #if defined(P_LINUX) || defined(P_SOLARIS)
+-#include <termio.h>
++#include <termios.h>
+ #endif
+
+ #include "../common/pipechan.cxx"
+--- ./src/ptlib/unix/channel.cxx.orig
++++ ./src/ptlib/unix/channel.cxx
+@@ -36,6 +36,7 @@
+
+ #include <ptlib.h>
+ #include <sys/ioctl.h>
++#include <sys/uio.h>
+
+
+ #include "../common/pchannel.cxx"
+--- ./src/ptlib/unix/osutil.cxx.orig
++++ ./src/ptlib/unix/osutil.cxx
+@@ -275,9 +275,9 @@
+ PInt64 PString::AsInt64(unsigned base) const
+ {
+ char * dummy;
+-#if defined(P_SOLARIS) || defined(__BEOS__) || defined (P_AIX) || defined(P_IRIX) || defined (P_QNX)
++#if (LONG_BIT == 32) || defined(P_SOLARIS) || defined(__BEOS__) || defined (P_AIX) || defined(P_IRIX) || defined (P_QNX)
+ return strtoll(theArray, &dummy, base);
+-#elif defined(P_VXWORKS) || defined(P_RTEMS)
++#elif (LONG_BIT == 64) || defined(P_VXWORKS) || defined(P_RTEMS)
+ return strtol(theArray, &dummy, base);
+ #else
+ return strtoq(theArray, &dummy, base);
+@@ -287,9 +287,9 @@
+ PUInt64 PString::AsUnsigned64(unsigned base) const
+ {
+ char * dummy;
+-#if defined(P_SOLARIS) || defined(__BEOS__) || defined (P_AIX) || defined (P_IRIX) || defined (P_QNX)
++#if (LONG_BIT == 32 ) || defined(P_SOLARIS) || defined(__BEOS__) || defined (P_AIX) || defined (P_IRIX) || defined (P_QNX)
+ return strtoull(theArray, &dummy, base);
+-#elif defined(P_VXWORKS) || defined(P_RTEMS)
++#elif (LONG_BIT == 64) || defined(P_VXWORKS) || defined(P_RTEMS)
+ return strtoul(theArray, &dummy, base);
+ #else
+ return strtouq(theArray, &dummy, base);
+--- ./src/ptlib/common/sockets.cxx.orig
++++ ./src/ptlib/common/sockets.cxx
+@@ -77,6 +77,9 @@
+ #endif
+ #endif
+
++#ifndef NETDB_SUCCESS
++#define NETDB_SUCCESS 0
++#endif
+
+ ///////////////////////////////////////////////////////////////////////////////
+ // PIPSocket::Address