Created
September 2, 2015 11:33
-
-
Save jacobsa/b86cf524156ca10c54e1 to your computer and use it in GitHub Desktop.
Daemon strlcpy strlcat patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -Naur daemon-0.6.4.old/daemon.c daemon-0.6.4/daemon.c | |
--- daemon-0.6.4.old/daemon.c 2010-06-12 06:37:00.000000000 -0700 | |
+++ daemon-0.6.4/daemon.c 2014-03-15 08:25:15.000000000 -0700 | |
@@ -651,6 +651,8 @@ | |
#define _NETBSD_SOURCE /* For CEOF, chroot() on NetBSD-5.0.2 */ | |
#endif | |
+#include <config.h> | |
+ | |
#include <slack/std.h> | |
#include <pwd.h> | |
diff -Naur daemon-0.6.4.old/libslack/str.h daemon-0.6.4/libslack/str.h | |
--- daemon-0.6.4.old/libslack/str.h 2010-06-12 06:37:00.000000000 -0700 | |
+++ daemon-0.6.4/libslack/str.h 2014-03-15 08:16:09.000000000 -0700 | |
@@ -254,8 +254,15 @@ | |
int oct(const char *str); | |
int strcasecmp(const char *s1, const char *s2); | |
int strncasecmp(const char *s1, const char *s2, size_t n); | |
+ | |
+#ifndef HAVE_STRLCPY | |
size_t strlcpy(char *dst, const char *src, size_t size); | |
+#endif | |
+ | |
+#ifndef HAVE_STRLCAT | |
size_t strlcat(char *dst, const char *src, size_t size); | |
+#endif | |
+ | |
char *cstrcpy(char *dst, const char *src); | |
char *cstrcat(char *dst, const char *src); | |
char *cstrchr(const char *str, int c); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment