Blame view

buildroot/buildroot-2016.08.1/package/openobex/0002-replace_deprecated_functions.patch 1.03 KB
6b13f685e   김민수   BSP 최초 추가
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
34
  obex_test_cable.c: avoid to use SuSv3 LEGACY APIs
  
  Signed-off-by: Julien Boibessot <julien.boibessot@armadeus.com>
  Signed-off-by: Samuel Martin <s.martin49@gmail.com>
  
  Index: openobex-1.5/apps/obex_test_cable.c
  ===================================================================
  --- openobex-1.5.orig/apps/obex_test_cable.c	2009-02-08 19:30:22.000000000 +0100
  +++ openobex-1.5/apps/obex_test_cable.c	2010-06-16 11:11:05.000000000 +0200
  @@ -113,9 +113,9 @@
   			if(total == sizeof(tmpbuf))
   				return -1;
   
  -			if( (answer = index(tmpbuf, '
  ')) )	{
  +			if( (answer = strchr(tmpbuf, '
  ')) )	{
   				// Remove first line (echo)
  -				if( (answer_end = index(answer+1, '
  ')) )	{
  +				if( (answer_end = strchr(answer+1, '
  ')) )	{
   					// Found end of answer
   					done = 1;
   				}
  @@ -178,7 +178,7 @@
   	}
   
   	tcgetattr(gt->ttyfd, &gt->oldtio);
  -	bzero(&gt->newtio, sizeof(struct termios));
  +	memset(&gt->newtio, 0, sizeof(struct termios));
   	gt->newtio.c_cflag = B115200 | CS8 | CREAD | CRTSCTS;
   	gt->newtio.c_iflag = IGNPAR;
   	gt->newtio.c_oflag = 0;