summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJay Sorg <jay.sorg@gmail.com>2014-02-08 21:48:44 -0800
committerJay Sorg <jay.sorg@gmail.com>2014-02-08 21:48:44 -0800
commit43e388b7e5e6bea5c79a462afc24edbf91de91fd (patch)
tree530acd61ed3bec495e739edabdc010a673f4c922
parent4e6d57dbe5cf231648425c686265ecc9bb8c5b7b (diff)
downloadxrdp-proprietary-43e388b7e5e6bea5c79a462afc24edbf91de91fd.tar.gz
xrdp-proprietary-43e388b7e5e6bea5c79a462afc24edbf91de91fd.zip
remove some warning, move gethostname to os_calls
-rw-r--r--common/os_calls.c14
-rw-r--r--common/os_calls.h1
-rw-r--r--xrdp/xrdp.h4
-rw-r--r--xrdp/xrdp_login_wnd.c4
-rw-r--r--xrdp/xrdp_wm.c3
5 files changed, 22 insertions, 4 deletions
diff --git a/common/os_calls.c b/common/os_calls.c
index ee9792b1..80b2d235 100644
--- a/common/os_calls.c
+++ b/common/os_calls.c
@@ -613,7 +613,11 @@ int APP_CC
g_sck_get_peer_cred(int sck, int *pid, int *uid, int *gid)
{
#if defined(SO_PEERCRED)
+#if defined(_WIN32)
int ucred_length;
+#else
+ unsigned int ucred_length;
+#endif
struct myucred
{
pid_t pid;
@@ -3151,7 +3155,7 @@ g_shmat(int shmid)
}
/*****************************************************************************/
-/* returns -1 on error */
+/* returns -1 on error 0 on success */
int APP_CC
g_shmdt(const void *shmaddr)
{
@@ -3161,3 +3165,11 @@ g_shmdt(const void *shmaddr)
return shmdt(shmaddr);
#endif
}
+
+/*****************************************************************************/
+/* returns -1 on error 0 on success */
+int APP_CC
+g_gethostname(char *name, int len)
+{
+ return gethostname(name, len);
+}
diff --git a/common/os_calls.h b/common/os_calls.h
index 2bee6077..06ce8494 100644
--- a/common/os_calls.h
+++ b/common/os_calls.h
@@ -163,5 +163,6 @@ int APP_CC g_time3(void);
int APP_CC g_text2bool(const char *s);
void * APP_CC g_shmat(int shmid);
int APP_CC g_shmdt(const void *shmaddr);
+int APP_CC g_gethostname(char *name, int len);
#endif
diff --git a/xrdp/xrdp.h b/xrdp/xrdp.h
index 172d417a..e04dea5f 100644
--- a/xrdp/xrdp.h
+++ b/xrdp/xrdp.h
@@ -108,6 +108,8 @@ xrdp_wm_send_bitmap(struct xrdp_wm* self, struct xrdp_bitmap* bitmap,
int x, int y, int cx, int cy);
int APP_CC
xrdp_wm_set_pointer(struct xrdp_wm* self, int cache_idx);
+unsigned int APP_CC
+xrdp_wm_htoi (const char *ptr);
int APP_CC
xrdp_wm_set_focused(struct xrdp_wm* self, struct xrdp_bitmap* wnd);
int APP_CC
@@ -349,6 +351,8 @@ get_keymaps(int keylayout, struct xrdp_keymap* keymap);
/* xrdp_login_wnd.c */
int APP_CC
xrdp_login_wnd_create(struct xrdp_wm* self);
+int APP_CC
+load_xrdp_config(struct xrdp_config *config);
/* xrdp_bitmap_compress.c */
int APP_CC
diff --git a/xrdp/xrdp_login_wnd.c b/xrdp/xrdp_login_wnd.c
index 8011b468..bd63b0ec 100644
--- a/xrdp/xrdp_login_wnd.c
+++ b/xrdp/xrdp_login_wnd.c
@@ -559,7 +559,7 @@ xrdp_login_wnd_create(struct xrdp_wm *self)
self->login_window->notify = xrdp_wm_login_notify;
- gethostname(buf1, 256);
+ g_gethostname(buf1, 256);
g_sprintf(buf, "Login to %s", buf1);
set_string(&self->login_window->caption1, buf);
@@ -642,7 +642,7 @@ xrdp_login_wnd_create(struct xrdp_wm *self)
*
* @return 0 on success, -1 on failure
*****************************************************************************/
-
+int APP_CC
load_xrdp_config(struct xrdp_config *config)
{
struct xrdp_cfg_globals *globals;
diff --git a/xrdp/xrdp_wm.c b/xrdp/xrdp_wm.c
index 547a01bf..e0657fac 100644
--- a/xrdp/xrdp_wm.c
+++ b/xrdp/xrdp_wm.c
@@ -323,7 +323,8 @@ xrdp_wm_set_pointer(struct xrdp_wm *self, int cache_idx)
/*****************************************************************************/
/* convert hex string to int */
-unsigned int xrdp_wm_htoi (const char *ptr)
+unsigned int APP_CC
+xrdp_wm_htoi (const char *ptr)
{
unsigned int value = 0;
char ch = *ptr;