blob: a472caf53f305c23ddd546c2d8ae4c29e6d45b31 (
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
|
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 *);
|