The cirros image was rebuilt against the 3.13.0-83 kernel, drivers e1000e, igbvf...
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / openobex / 0002-replace_deprecated_functions.patch
1 obex_test_cable.c: avoid to use SuSv3 LEGACY APIs
2
3 Signed-off-by: Julien Boibessot <julien.boibessot@armadeus.com>
4 Signed-off-by: Samuel Martin <s.martin49@gmail.com>
5
6 Index: openobex-1.5/apps/obex_test_cable.c
7 ===================================================================
8 --- openobex-1.5.orig/apps/obex_test_cable.c    2009-02-08 19:30:22.000000000 +0100
9 +++ openobex-1.5/apps/obex_test_cable.c 2010-06-16 11:11:05.000000000 +0200
10 @@ -113,9 +113,9 @@
11                         if(total == sizeof(tmpbuf))
12                                 return -1;
13  
14 -                       if( (answer = index(tmpbuf, '\n')) )    {
15 +                       if( (answer = strchr(tmpbuf, '\n')) )   {
16                                 // Remove first line (echo)
17 -                               if( (answer_end = index(answer+1, '\n')) )      {
18 +                               if( (answer_end = strchr(answer+1, '\n')) )     {
19                                         // Found end of answer
20                                         done = 1;
21                                 }
22 @@ -178,7 +178,7 @@
23         }
24  
25         tcgetattr(gt->ttyfd, &gt->oldtio);
26 -       bzero(&gt->newtio, sizeof(struct termios));
27 +       memset(&gt->newtio, 0, sizeof(struct termios));
28         gt->newtio.c_cflag = B115200 | CS8 | CREAD | CRTSCTS;
29         gt->newtio.c_iflag = IGNPAR;
30         gt->newtio.c_oflag = 0;