summaryrefslogtreecommitdiffstats
path: root/tdm/backend
diff options
context:
space:
mode:
Diffstat (limited to 'tdm/backend')
-rw-r--r--tdm/backend/CMakeLists.txt4
-rw-r--r--tdm/backend/ctrl.c2
-rw-r--r--tdm/backend/dm.c11
-rw-r--r--tdm/backend/dm.h4
-rw-r--r--tdm/backend/xdmcp.c2
5 files changed, 12 insertions, 11 deletions
diff --git a/tdm/backend/CMakeLists.txt b/tdm/backend/CMakeLists.txt
index f09704486..a9144d5ff 100644
--- a/tdm/backend/CMakeLists.txt
+++ b/tdm/backend/CMakeLists.txt
@@ -49,6 +49,8 @@ tde_add_executable( tdm
process.c protodpy.c reset.c resource.c rpcauth.c
server.c session.c sessreg.c socket.c streams.c
util.c xdmauth.c xdmcp.c
- LINK X11 ${XAU_LIBRARIES} ${DBUS_LIBRARIES} ${CRYPT_LIBRARY} ${PAM_LIBRARY} ${UTIL_LIBRARY} ${XDMCP_LIBRARIES}
+ LINK
+ X11 ${CMAKE_THREAD_LIBS_INIT} ${XAU_LIBRARIES} ${DBUS_LIBRARIES} ${CRYPT_LIBRARY}
+ ${PAM_LIBRARY} ${UTIL_LIBRARY} ${XDMCP_LIBRARIES}
DESTINATION ${BIN_INSTALL_DIR}
)
diff --git a/tdm/backend/ctrl.c b/tdm/backend/ctrl.c
index cc9540745..200b7056b 100644
--- a/tdm/backend/ctrl.c
+++ b/tdm/backend/ctrl.c
@@ -592,7 +592,7 @@ processCtrl( const char *string, int len, int fd, struct display *d )
} else if (fd >= 0 && !strcmp( ar[0], "activevt" )) {
#ifdef HAVE_VTS
Reply( "ok" );
- int vt_fd = getfd(NULL);
+ int vt_fd = getfd();
if (vt_fd > 0) {
struct vt_stat vtstat;
if (!ioctl(vt_fd, VT_GETSTATE, &vtstat)) {
diff --git a/tdm/backend/dm.c b/tdm/backend/dm.c
index 627d2c23d..05dfb7a5b 100644
--- a/tdm/backend/dm.c
+++ b/tdm/backend/dm.c
@@ -36,6 +36,13 @@ from the copyright holder.
#include <tqglobal.h>
+#include <config.h>
+#ifdef HAVE_PTHREAD_SETNAME_NP
+#define _GNU_SOURCE
+#define __BSD_VISIBLE 1
+#include <pthread.h>
+#endif /* pthread_setname_np() */
+
#include "dm.h"
#include "dm_auth.h"
#include "dm_error.h"
@@ -53,10 +60,6 @@ from the copyright holder.
# include <sys/vt.h>
#endif
-#ifdef HAVE_PTHREAD_SETNAME_NP
-#include <pthread.h>
-#endif /* pthread_setname_np() */
-
// Limited by the number of VTs configured into the kernel or 256, whichever is less
#define MAX_VT_NUMBER 48
diff --git a/tdm/backend/dm.h b/tdm/backend/dm.h
index ae731aeca..c3d327a5e 100644
--- a/tdm/backend/dm.h
+++ b/tdm/backend/dm.h
@@ -61,10 +61,6 @@ from the copyright holder.
#include <errno.h>
#ifdef XDMCP
-# if defined(__osf__)
-/* someone somewhere defines QUERY under Tru64 which confuses Xdmcp.h */
-# undef QUERY
-# endif
# include <X11/Xdmcp.h>
#endif
diff --git a/tdm/backend/xdmcp.c b/tdm/backend/xdmcp.c
index 6abaf5fc8..85bea54be 100644
--- a/tdm/backend/xdmcp.c
+++ b/tdm/backend/xdmcp.c
@@ -160,7 +160,7 @@ all_query_respond( struct sockaddr *from, int fromlen,
int family;
int length;
- family = ConvertAddr( (XdmcpNetaddr)from, &length, &(addr.data) );
+ family = ConvertAddr( (XdmcpNetaddr)from, &length, (char**)&(addr.data) );
addr.length = length; /* convert int to short */
Debug( "all_query_respond: conntype=%d, addr=%02[*:hhx\n",
family, addr.length, addr.data );