Группа :: Коммуникации
Пакет: SieFS
Главная Изменения Спек Патчи Загрузить Bugs and FR
Патч: siefs-0.4-fix-undeclared.patch
--- siefs-0.4/siefs/obex.c.fix-undeclared 2004-08-13 10:09:35 +0400
+++ siefs-0.4/siefs/obex.c 2004-09-04 22:55:44 +0400
@@ -16,6 +16,7 @@
#include <sys/stat.h>
#include <unistd.h>
#include <time.h>
+#include <ctype.h>
#include "bfb.h"
#include "obex.h"
@@ -151,6 +152,22 @@ void append_unicode(obexpacket *p, int h
p->len += (l+5);
}
+int abort_exchange(obexsession *os) {
+
+ unsigned char abuf[256];
+ int l;
+
+ abuf[0] = 0xff;
+ abuf[1] = 0;
+ abuf[2] = 0x03;
+
+ if (bfb_send(os->b, abuf, 3) < 0) return -1;
+ l = bfb_recv(os->b, abuf, sizeof(abuf));
+ if (l <= 0) return -1;
+ set_errno(abuf[0]);
+ return (abuf[0] == 0xa0) ? 0 : -1;
+}
+
int send_packet(obexsession *os, obexpacket *p) {
unsigned char *s;
@@ -444,22 +461,6 @@ void obex_shutdown(obexsession *os) {
free(os);
}
-int abort_exchange(obexsession *os) {
-
- unsigned char abuf[256];
- int l;
-
- abuf[0] = 0xff;
- abuf[1] = 0;
- abuf[2] = 0x03;
-
- if (bfb_send(os->b, abuf, 3) < 0) return -1;
- l = bfb_recv(os->b, abuf, sizeof(abuf));
- if (l <= 0) return -1;
- set_errno(abuf[0]);
- return (abuf[0] == 0xa0) ? 0 : -1;
-}
-
int obex_readdir(obexsession *os, char *dir) {
obexpacket *p = os->pc;
--- siefs-0.4/siefs/bfb.c.fix-undeclared 2004-08-13 10:26:03 +0400
+++ siefs-0.4/siefs/bfb.c 2004-09-04 22:56:29 +0400
@@ -10,6 +10,8 @@
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
#include <errno.h>
#include "comm.h"
#include "crcmodel.h"
--- siefs-0.4/siefs/comm.c.fix-undeclared 2003-11-13 17:06:18 +0300
+++ siefs-0.4/siefs/comm.c 2004-09-04 22:57:38 +0400
@@ -15,6 +15,7 @@
#include <termios.h>
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include <stdarg.h>
#include <errno.h>
#include "comm.h"
@@ -114,7 +115,7 @@ int comm_restore(hcomm *h) {
if (fd < 0) return -1;
h->fd = fd;
- bzero(&tio, sizeof(tio));
+ memset(&tio, 0, sizeof(tio));
f = commflags(h->speed);
if (f == -1) return -1;
tio.c_cflag = f;
--- siefs-0.4/siefs/slink.c.fix-undeclared 2003-01-21 15:32:35 +0300
+++ siefs-0.4/siefs/slink.c 2004-09-04 22:57:55 +0400
@@ -13,6 +13,7 @@
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
+#include <unistd.h>
#include <time.h>
#include <fcntl.h>