micropython: replace local fix with upstream one
[buildroot-gz.git] / package / openobex / 0002-replace_deprecated_functions.patch
blob17274d385bb690c50c13b4007c84ce14ac66e586
1 obex_test_cable.c: avoid to use SuSv3 LEGACY APIs
3 Signed-off-by: Julien Boibessot <julien.boibessot@armadeus.com>
4 Signed-off-by: Samuel Martin <s.martin49@gmail.com>
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;
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;
22 @@ -178,7 +178,7 @@
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;