Blame plasma-user-manager-libxcrypt.patch

6f5fcda
diff --git a/CMakeLists.txt b/CMakeLists.txt
39718dc
index 94c4fb9..633514b 100644
6f5fcda
--- a/CMakeLists.txt
6f5fcda
+++ b/CMakeLists.txt
852f26d
@@ -22,6 +22,12 @@ include(ECMQtDeclareLoggingCategory)
852f26d
 
6f5fcda
 include_directories(${PWQUALITY_INCLUDE_DIR})
852f26d
 
6f5fcda
+if (NOT APPLE)
6f5fcda
+include(FindPkgConfig)
6f5fcda
+pkg_check_modules(LIBXCRYPT REQUIRED libxcrypt)
6f5fcda
+include_directories(${LIBXCRYPT_INCLUDE_DIRS})
6f5fcda
+endif()
6f5fcda
+
6f5fcda
 # Set KI18n translation domain
6f5fcda
 add_definitions(-DTRANSLATION_DOMAIN=\"user_manager\")
d1dd6ff
 if (EXISTS "${CMAKE_SOURCE_DIR}/.git")
6f5fcda
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
852f26d
index edeb158..2a19c71 100644
6f5fcda
--- a/src/CMakeLists.txt
6f5fcda
+++ b/src/CMakeLists.txt
852f26d
@@ -54,7 +54,7 @@ target_link_libraries(user_manager
6f5fcda
 )
6f5fcda
 
6f5fcda
 if (NOT APPLE)
6f5fcda
-target_link_libraries(user_manager crypt)
6f5fcda
+target_link_libraries(user_manager ${LIBXCRYPT_LIBRARIES})
6f5fcda
 endif()
6f5fcda
 
6f5fcda
 install(TARGETS user_manager DESTINATION ${PLUGIN_INSTALL_DIR})
6f5fcda
diff --git a/src/lib/accountmodel.cpp b/src/lib/accountmodel.cpp
852f26d
index a17b9c3..25f45fb 100644
6f5fcda
--- a/src/lib/accountmodel.cpp
6f5fcda
+++ b/src/lib/accountmodel.cpp
852f26d
@@ -40,6 +40,8 @@
6f5fcda
 #include <KConfig>
6f5fcda
 #include <KConfigGroup>
6f5fcda
 
6f5fcda
+#include <crypt.h>
6f5fcda
+
6f5fcda
 AutomaticLoginSettings::AutomaticLoginSettings()
852f26d
 {
852f26d
     KConfig config(QStringLiteral("/etc/sddm.conf.d/kde_settings.conf"));