git-svn: trunk@2668
Nigel Horne authored on 2007/02/01 17:03:41... | ... |
@@ -1,3 +1,8 @@ |
1 |
+Thu Feb 1 08:02:50 GMT 2007 (njh) |
|
2 |
+---------------------------------- |
|
3 |
+ * libclamav/entconv.c: Fix compilation error on earlier OpenBSDs |
|
4 |
+ (patch from Edwin) |
|
5 |
+ |
|
1 | 6 |
Thu Feb 1 00:47:48 CET 2007 (tk) |
2 | 7 |
--------------------------------- |
3 | 8 |
* 0.90RC3 (released with JS and PST code removed) |
... | ... |
@@ -47,6 +47,9 @@ |
47 | 47 |
|
48 | 48 |
#define MAX_LINE 1024 |
49 | 49 |
|
50 |
+#ifndef EILSEQ |
|
51 |
+#define EILSEQ 84 |
|
52 |
+#endif |
|
50 | 53 |
|
51 | 54 |
unsigned char* entity_norm(const struct entity_conv* conv,const unsigned char* entity) |
52 | 55 |
{ |
... | ... |
@@ -269,13 +272,13 @@ static int iconv(iconv_t iconv_struct,char **inbuf, size_t *inbytesleft, |
269 | 269 |
case E_UTF16_LE: |
270 | 270 |
{ |
271 | 271 |
for(i=0;i < maxcopy;i += 2) { |
272 |
- outbuf[i] = inbuf[i+1]; |
|
273 |
- outbuf[i+1] = inbuf[i]; |
|
272 |
+ output[i] = input[i+1]; |
|
273 |
+ output[i+1] = input[i]; |
|
274 | 274 |
} |
275 | 275 |
break; |
276 | 276 |
} |
277 | 277 |
case E_UTF16_BE: |
278 |
- memcpy(*outbuf,*inbuf,maxcopy); |
|
278 |
+ memcpy(output,input,maxcopy); |
|
279 | 279 |
break; |
280 | 280 |
case E_UNKNOWN: |
281 | 281 |
case E_OTHER: |