File: strlcpy.patch

package info (click to toggle)
fte 0.50.2b6-20110708-8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,784 kB
  • sloc: cpp: 47,986; ansic: 2,800; sh: 112; makefile: 70; perl: 29
file content (26 lines) | stat: -rw-r--r-- 484 bytes parent folder | download | duplicates (2)
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
Author: Andreas Beckmann <anbe@debian.org>
Description: fix building with strlcpy() provided by glibc 2.38

--- a/src/sysdep.h
+++ b/src/sysdep.h
@@ -189,8 +189,13 @@
 #define ftruncate _ftruncate
 #endif
 
+#if 0
 #undef HAVE_STRLCPY
 #undef HAVE_STRLCAT
+#else
+#define HAVE_STRLCPY
+#define HAVE_STRLCAT
+#endif
 
 #ifndef HAVE_BOOL
 #define bool  int
--- a/src/s_string.cpp
+++ b/src/s_string.cpp
@@ -1,3 +1,4 @@
+#include "sysdep.h"
 #include "s_string.h"
 
 #include <string.h>