Fix FTBFS on freebsd

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/2/head
Slávek Banko 9 years ago
parent e1d8ccc637
commit 08122b137e

@ -50,7 +50,7 @@ if( WITH_PAM AND (BUILD_KCHECKPASS OR BUILD_TDM) )
check_include_file( "security/pam_appl.h" SECURITY_PAM_APPL_H ) check_include_file( "security/pam_appl.h" SECURITY_PAM_APPL_H )
endif( ) endif( )
if( HAVE_PAM AND SECURITY_PAM_APPL_H ) if( HAVE_PAM AND SECURITY_PAM_APPL_H )
set( PAM_LIBRARY pam;dl ) set( PAM_LIBRARY pam ${DL_LIBRARIES} )
else( ) else( )
tde_message_fatal( "pam are requested, but not found on your system" ) tde_message_fatal( "pam are requested, but not found on your system" )
endif( ) endif( )

@ -41,6 +41,7 @@ bin/xscreensaver-hacks hacks)
/usr/share/xscreensaver/ /usr/share/xscreensaver/
/usr/local/kde/ /usr/local/kde/
/usr/local/xscreensaver/ /usr/local/xscreensaver/
/usr/local/share/xscreensaver/
/usr/openwin/lib/xscreensaver/ /usr/openwin/lib/xscreensaver/
/etc/ /etc/
) )

@ -81,8 +81,8 @@
#ifdef __linux__ #ifdef __linux__
#include <linux/stat.h> #include <linux/stat.h>
#include <pthread.h>
#endif #endif
#include <pthread.h>
#include <X11/Xlib.h> #include <X11/Xlib.h>
#include <X11/Xutil.h> #include <X11/Xutil.h>

@ -16,6 +16,7 @@ if( NOT DEFINED HTDIG_SEARCH_BINARY )
HINTS HINTS
/srv/www/cgi-bin /srv/www/cgi-bin
/usr/lib/cgi-bin /usr/lib/cgi-bin
/usr/local/www/cgi-bin
) )
if( HTDIG_SEARCH_BINARY ) if( HTDIG_SEARCH_BINARY )
message( STATUS "Looking for htsearch - ${HTDIG_SEARCH_BINARY}" ) message( STATUS "Looking for htsearch - ${HTDIG_SEARCH_BINARY}" )

@ -95,7 +95,7 @@
#include "flipscrollview.h" #include "flipscrollview.h"
#include "itemview.h" #include "itemview.h"
#include <dmctl.h> #include <dmctl.h>
#ifdef __OpenBSD__ #if defined(__OpenBSD__) || defined(__FreeBSD__)
#include <sys/statvfs.h> #include <sys/statvfs.h>
#include <sys/param.h> #include <sys/param.h>
#include <sys/mount.h> #include <sys/mount.h>

@ -17,6 +17,8 @@ if( ${CMAKE_SYSTEM_NAME} MATCHES "Linux" )
set( OS_SPECIFIC_DIR Linux ) set( OS_SPECIFIC_DIR Linux )
elseif( ${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD" ) elseif( ${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD" )
set( OS_SPECIFIC_DIR OpenBSD ) set( OS_SPECIFIC_DIR OpenBSD )
elseif( ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" )
set( OS_SPECIFIC_DIR FreeBSD )
else() else()
tde_message_fatal( "Your operating system (${CMAKE_SYSTEM_NAME}) is not supported yet." ) tde_message_fatal( "Your operating system (${CMAKE_SYSTEM_NAME}) is not supported yet." )
endif() endif()

@ -0,0 +1,26 @@
#################################################
#
# (C) 2015 Serghei Amelian
# slavek (DOT) banko (AT) axis.cz
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################
include_directories(
${CMAKE_BINARY_DIR}
${CMAKE_SOURCE_DIR}/ksysguard/CContLib
${CMAKE_SOURCE_DIR}/ksysguard/ksysguardd
)
##### ksysguardd (static) #######################
tde_add_library( ksysguardd STATIC
SOURCES
CPU.c Memory.c ProcessList.c apm.c diskstat.c loadavg.c logfile.c netdev.c
LINK kvm
)

@ -40,7 +40,7 @@ tde_add_kpart( kcm_keyboard AUTOMOC
extension.cpp x11helper.cpp rules.cpp kxkbconfig.cpp extension.cpp x11helper.cpp rules.cpp kxkbconfig.cpp
pixmap.cpp kcmlayout.cpp kcmlayoutwidget.ui pixmap.cpp kcmlayout.cpp kcmlayoutwidget.ui
kcmmisc.cpp kcmmiscwidget.ui kcmmisc.cpp kcmmiscwidget.ui
LINK tdeio-shared xkbfile ${XTEST_LIBRARIES} LINK tdeio-shared ${XKBFILE_LIBRARIES} ${XTEST_LIBRARIES}
DESTINATION ${PLUGIN_INSTALL_DIR} DESTINATION ${PLUGIN_INSTALL_DIR}
) )
@ -52,5 +52,5 @@ tde_add_tdeinit_executable( kxkb AUTOMOC
extension.cpp x11helper.cpp rules.cpp kxkbconfig.cpp extension.cpp x11helper.cpp rules.cpp kxkbconfig.cpp
pixmap.cpp layoutmap.cpp kxkb.cpp kxkbtraywindow.cpp pixmap.cpp layoutmap.cpp kxkb.cpp kxkbtraywindow.cpp
kxkb.skel kxkb.skel
LINK tdeui-shared xkbfile LINK tdeui-shared ${XKBFILE_LIBRARIES}
) )

@ -13,3 +13,8 @@ find_program( SETXKBMAP setxkbmap )
if( SETXKBMAP-NOTFOUND ) if( SETXKBMAP-NOTFOUND )
tde_message_fatal( "setxkbmap is required, but not found on your system" ) tde_message_fatal( "setxkbmap is required, but not found on your system" )
endif() endif()
pkg_search_module( XKBFILE xkbfile )
if( NOT XKBFILE_FOUND )
tde_message_fatal( "xkbfile is requested, but was not found on your system" )
endif()

@ -19,7 +19,7 @@
#include "medianotifier.h" #include "medianotifier.h"
#ifdef __OpenBSD__ #if defined (__OpenBSD__) || defined(__FreeBSD__)
#include <sys/statvfs.h> #include <sys/statvfs.h>
#include <sys/param.h> #include <sys/param.h>
#include <sys/mount.h> #include <sys/mount.h>

@ -45,7 +45,7 @@
#include <pwd.h> #include <pwd.h>
#include <errno.h> #include <errno.h>
#ifndef __OpenBSD__ #if !defined(__OpenBSD__) && !defined(__FreeBSD__)
#include <sys/prctl.h> #include <sys/prctl.h>
#endif #endif
#include <sys/time.h> #include <sys/time.h>
@ -251,7 +251,7 @@ int create_socket()
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
#ifndef __OpenBSD__ #if !defined(__OpenBSD__) && !defined(__FreeBSD__)
prctl(PR_SET_DUMPABLE, 0); prctl(PR_SET_DUMPABLE, 0);
#endif #endif

@ -43,6 +43,6 @@ tde_add_executable( tdm
process.c protodpy.c reset.c resource.c rpcauth.c process.c protodpy.c reset.c resource.c rpcauth.c
server.c session.c sessreg.c socket.c streams.c server.c session.c sessreg.c socket.c streams.c
util.c xdmauth.c xdmcp.c util.c xdmauth.c xdmcp.c
LINK X11 ${XAU_LIBRARIES} ${DBUS_LIBRARIES} ${CRYPT_LIBRARY} ${PAM_LIBRARY} ${XDMCP_LIBRARIES} LINK X11 ${XAU_LIBRARIES} ${DBUS_LIBRARIES} ${CRYPT_LIBRARY} ${PAM_LIBRARY} ${UTIL_LIBRARY} ${XDMCP_LIBRARIES}
DESTINATION ${BIN_INSTALL_DIR} DESTINATION ${BIN_INSTALL_DIR}
) )

@ -106,7 +106,6 @@ typedef int waitType;
# define Jmp_buf sigjmp_buf # define Jmp_buf sigjmp_buf
#endif #endif
#include <utmp.h>
#ifdef HAVE_UTMPX #ifdef HAVE_UTMPX
# include <utmpx.h> # include <utmpx.h>
# define STRUCTUTMP struct utmpx # define STRUCTUTMP struct utmpx
@ -119,6 +118,7 @@ typedef int waitType;
# define ut_time ut_tv.tv_sec # define ut_time ut_tv.tv_sec
# define ll_time ll_tv.tv_sec # define ll_time ll_tv.tv_sec
#else #else
# include <utmp.h>
# define STRUCTUTMP struct utmp # define STRUCTUTMP struct utmp
# define UTMPNAME utmpname # define UTMPNAME utmpname
# define SETUTENT setutent # define SETUTENT setutent
@ -126,9 +126,9 @@ typedef int waitType;
# define PUTUTLINE pututline # define PUTUTLINE pututline
# define ENDUTENT endutent # define ENDUTENT endutent
# define LASTLOG lastlog # define LASTLOG lastlog
#endif # ifndef HAVE_STRUCT_UTMP_UT_USER
#ifndef HAVE_STRUCT_UTMP_UT_USER # define ut_user ut_name
# define ut_user ut_name # endif
#endif #endif
#ifndef WTMP_FILE #ifndef WTMP_FILE
# ifdef _PATH_WTMPX # ifdef _PATH_WTMPX

@ -22,7 +22,7 @@ is_a_console(int fd) {
char arg; char arg;
arg = 0; arg = 0;
#ifdef __OpenBSD__ #if defined(__OpenBSD__) || defined(__FreeBSD__)
return arg; return arg;
#else #else
return (ioctl(fd, KDGKBTYPE, &arg) == 0 return (ioctl(fd, KDGKBTYPE, &arg) == 0

@ -42,6 +42,13 @@ from The Open Group.
#if defined(__svr4__) || defined(__Lynx__) || defined(__QNX__) || defined(__APPLE__) || defined(_SEQUENT_) /*|| defined(USE_PAM)*/ #if defined(__svr4__) || defined(__Lynx__) || defined(__QNX__) || defined(__APPLE__) || defined(_SEQUENT_) /*|| defined(USE_PAM)*/
# define NO_LASTLOG # define NO_LASTLOG
#endif #endif
#ifdef __FreeBSD__
# include <sys/param.h>
# if __FreeBSD_version >= 900007
# define NO_LASTLOG
# endif
#endif
#ifndef NO_LASTLOG #ifndef NO_LASTLOG
# ifdef HAVE_LASTLOG_H # ifdef HAVE_LASTLOG_H
@ -254,7 +261,9 @@ sessreg( struct display *d, int pid, const char *user, int uid )
close( utmp ); close( utmp );
} }
# else # else
# if !defined(__FreeBSD__)
UTMPNAME( UTMP_FILE ); UTMPNAME( UTMP_FILE );
# endif
SETUTENT(); SETUTENT();
PUTUTLINE( &ut_ent ); PUTUTLINE( &ut_ent );
ENDUTENT(); ENDUTENT();

@ -44,7 +44,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include <limits.h> #include <limits.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/param.h> #include <sys/param.h>
#ifdef BSD #if defined(BSD) && !defined(HAVE_UTMPX)
# include <utmp.h> # include <utmp.h>
#endif #endif
@ -1537,8 +1537,13 @@ edit_startup( File *file )
"fi\n") | "fi\n") |
#else #else
# ifdef BSD # ifdef BSD
# ifdef HAVE_UTMPX
delstr( file, "\n"
"exec sessreg -a -l $DISPLAY -x */Xservers $USER\n" ) |
# else
delstr( file, "\n" delstr( file, "\n"
"exec sessreg -a -l $DISPLAY -x */Xservers -u " _PATH_UTMP " $USER\n" ) | "exec sessreg -a -l $DISPLAY -x */Xservers -u " _PATH_UTMP " $USER\n" ) |
# endif
# endif # endif
#endif /* _AIX */ #endif /* _AIX */
delstr( file, "\n" delstr( file, "\n"
@ -1586,8 +1591,13 @@ edit_reset( File *file )
"fi\n" ) | "fi\n" ) |
#else #else
# ifdef BSD # ifdef BSD
# ifdef HAVE_UTMPX
delstr( file, "\n"
"exec sessreg -d -l $DISPLAY -x */Xservers $USER\n" ) |
# else
delstr( file, "\n" delstr( file, "\n"
"exec sessreg -d -l $DISPLAY -x */Xservers -u " _PATH_UTMP " $USER\n" ) | "exec sessreg -d -l $DISPLAY -x */Xservers -u " _PATH_UTMP " $USER\n" ) |
# endif
# endif # endif
#endif /* _AIX */ #endif /* _AIX */
delstr( file, "\n" delstr( file, "\n"

@ -70,9 +70,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include <unistd.h> #include <unistd.h>
#include <fcntl.h> #include <fcntl.h>
#include <sys/types.h> #include <sys/types.h>
#include <utmp.h>
#ifdef HAVE_UTMPX #ifdef HAVE_UTMPX
#include <utmpx.h> # include <utmpx.h>
#else
# include <utmp.h>
#endif #endif
#include <stdio.h> #include <stdio.h>

Loading…
Cancel
Save