summaryrefslogtreecommitdiffstats
path: root/xrdp/os_calls.c
diff options
context:
space:
mode:
Diffstat (limited to 'xrdp/os_calls.c')
-rw-r--r--xrdp/os_calls.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/xrdp/os_calls.c b/xrdp/os_calls.c
index a9663a00..bed917c3 100644
--- a/xrdp/os_calls.c
+++ b/xrdp/os_calls.c
@@ -55,7 +55,7 @@ static int g_term = 0;
#ifdef MEMLEAK
static int g_memsize = 0;
static int g_memid = 0;
-struct xrdp_list* g_memlist = 0;
+static struct xrdp_list* g_memlist = 0;
#endif
/*****************************************************************************/
@@ -254,9 +254,9 @@ int g_tcp_set_non_blocking(int sck)
#ifdef _WIN32
i = 1;
- ioctlsocket(sck, FIONBIO, &i);
-#else
- i = fcntl(sck, F_GETFL);
+ ioctlsocket(sck, FIONBIO, &i);
+#else
+ i = fcntl(sck, F_GETFL);
i = i | O_NONBLOCK;
fcntl(sck, F_SETFL, i);
#endif
@@ -634,6 +634,16 @@ char* g_strcpy(char* dest, char* src)
}
/*****************************************************************************/
+char* g_strncpy(char* dest, char* src, int len)
+{
+ char* rv;
+
+ rv = strncpy(dest, src, len);
+ dest[len] = 0;
+ return rv;
+}
+
+/*****************************************************************************/
char* g_strcat(char* dest, char* src)
{
return strcat(dest, src);