summaryrefslogtreecommitdiff
path: root/data/weechat_/strndup.diff
diff options
context:
space:
mode:
Diffstat (limited to 'data/weechat_/strndup.diff')
-rw-r--r--data/weechat_/strndup.diff33
1 files changed, 33 insertions, 0 deletions
diff --git a/data/weechat_/strndup.diff b/data/weechat_/strndup.diff
new file mode 100644
index 000000000..a472caf53
--- /dev/null
+++ b/data/weechat_/strndup.diff
@@ -0,0 +1,33 @@
+diff -ru weechat-0.2.6/src/common/util.c weechat-0.2.6+iPhone/src/common/util.c
+--- weechat-0.2.6/src/common/util.c 2007-08-31 13:24:45.000000000 +0000
++++ weechat-0.2.6+iPhone/src/common/util.c 2008-07-31 03:29:17.000000000 +0000
+@@ -43,6 +43,7 @@
+
+ #include "weechat.h"
+ #include "utf8.h"
++#include "util.h"
+ #include "weeconfig.h"
+
+
+@@ -52,7 +53,7 @@
+
+ #ifndef HAVE_STRNDUP
+ char *
+-strndup (char *string, int length)
++strndup (const char *string, size_t length)
+ {
+ char *result;
+
+diff -ru weechat-0.2.6/src/common/util.h weechat-0.2.6+iPhone/src/common/util.h
+--- weechat-0.2.6/src/common/util.h 2007-07-11 11:21:02.000000000 +0000
++++ weechat-0.2.6+iPhone/src/common/util.h 2008-07-31 03:28:59.000000000 +0000
+@@ -21,7 +21,8 @@
+ #define __WEECHAT_UTIL_H 1
+
+ #ifndef HAVE_STRNDUP
+-extern char *strndup (char *, int);
++#undef strndup
++extern char *strndup (const char *, size_t);
+ #endif
+ extern void ascii_tolower (char *);
+ extern void ascii_toupper (char *);