aboutsummaryrefslogtreecommitdiffstats
path: root/unmaintained/ptlib/musl-fixes.patch
blob: a0819c89d572ae404c55067e925dbbfe8d148932 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
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