summaryrefslogtreecommitdiffstats
path: root/trinity-base/ksysguard/files/ksysguard-strlcpy-14.1.0.patch
blob: 8901b1b27c0b9d073db6fd9cffcaa117b981fb6d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
--- a/config.h.cmake	2023-07-04 20:10:53.550250219 +0300
+++ b/config.h.cmake	2023-07-04 20:18:18.312261752 +0300
@@ -130,6 +130,33 @@
 // kcontrol/input
 #cmakedefine HAVE_LIBUSB 1
 
+// ksysguard, kcheckpass
+#cmakedefine HAVE_STRLCAT 1
+#cmakedefine HAVE_STRLCAT_PROTO 1
+#cmakedefine HAVE_STRLCPY 1
+#cmakedefine HAVE_STRLCPY_PROTO 1
+
+#if !defined(HAVE_STRLCAT_PROTO)
+#ifdef __cplusplus
+extern "C" {
+#endif
+unsigned long strlcat(char*, const char*, unsigned long);
+#ifdef __cplusplus
+}
+#endif
+#endif
+
+#if !defined(HAVE_STRLCPY_PROTO)
+#ifdef __cplusplus
+extern "C" {
+#endif
+unsigned long strlcpy(char*, const char*, unsigned long);
+#ifdef __cplusplus
+}
+#endif
+#endif
+
+
 // tdeprint
 #cmakedefine HAVE_SIGACTION 1
 #cmakedefine HAVE_SIGSET 1
--- a/ConfigureChecks.cmake	2023-07-04 20:10:53.550250219 +0300
+++ b/ConfigureChecks.cmake	2023-07-04 20:16:46.905259381 +0300
@@ -381,6 +381,15 @@
 endif( )
 
 
+# strlcat, strlcpy
+if( BUILD_KSYSGUARD OR BUILD_KCHECKPASS )
+  check_function_exists( strlcat HAVE_STRLCAT )
+  check_symbol_exists( strlcat "string.h" HAVE_STRLCAT_PROTO )
+  check_function_exists( strlcpy HAVE_STRLCPY )
+  check_symbol_exists( strlcpy "string.h" HAVE_STRLCPY_PROTO )
+endif( )
+
+
 # getifaddrs (kcontrol, tdm)
 if( BUILD_KCONTROL OR BUILD_TDM )
   check_function_exists( getifaddrs HAVE_GETIFADDRS )