0002-replace_deprecated_functions.patch 1.0 KB

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