OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

74 lines
2.7 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../libvncserver/legacy_sus.patch
  5. # Copyright (C) 2010 The OpenSDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This patch file is dual-licensed. It is available under the license the
  10. # patched project is licensed under, as long as it is an OpenSource license
  11. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  12. # of the GNU General Public License as published by the Free Software
  13. # Foundation; either version 2 of the License, or (at your option) any later
  14. # version.
  15. # --- SDE-COPYRIGHT-NOTE-END ---
  16. usleep() was deprecated by SUSv3 and newer LIBCs are starting to enforce that
  17. deprecation.
  18. --- ./libvncserver/tightvnc-filetransfer/filetransfermsg.c.orig 2010-09-20 13:54:07.000000000 -0400
  19. +++ ./libvncserver/tightvnc-filetransfer/filetransfermsg.c 2010-09-20 14:02:20.000000000 -0400
  20. @@ -28,7 +28,7 @@
  21. #include <stdlib.h>
  22. #include <fcntl.h>
  23. #include <dirent.h>
  24. -#include <utime.h>
  25. +#include <sys/time.h>
  26. #include <errno.h>
  27. #include <unistd.h>
  28. #include <sys/stat.h>
  29. @@ -530,10 +530,11 @@
  30. {
  31. /* Here we are settimg the modification and access time of the file */
  32. /* Windows code stes mod/access/creation time of the file */
  33. - struct utimbuf utb;
  34. + struct timeval times[2];
  35. - utb.actime = utb.modtime = rtcp->rcft.rcfu.mTime;
  36. - if(utime(rtcp->rcft.rcfu.fName, &utb) == -1) {
  37. + times[0] = times[1] = (struct timeval) { .tv_sec = rtcp->rcft.rcfu.mTime, .tv_usec = 0 };
  38. +
  39. + if(utimes(rtcp->rcft.rcfu.fName, times) == -1) {
  40. rfbLog("File [%s]: Method [%s]: Setting the modification/access"
  41. " time for the file <%s> failed\n", __FILE__,
  42. __FUNCTION__, rtcp->rcft.rcfu.fName);
  43. --- ./libvncclient/sockets.c.orig 2010-09-20 14:10:30.000000000 -0400
  44. +++ ./libvncclient/sockets.c 2010-09-20 14:13:55.000000000 -0400
  45. @@ -92,8 +92,10 @@
  46. diff.tv_usec+=1000000;
  47. }
  48. #ifndef __MINGW32__
  49. - sleep (diff.tv_sec);
  50. - usleep (diff.tv_usec);
  51. + {
  52. + struct timespec ts = { diff.tv_sec, diff.tv_usec * 1000 };
  53. + nanosleep(&ts, NULL);
  54. + }
  55. #else
  56. Sleep (diff.tv_sec * 1000 + diff.tv_usec/1000);
  57. #endif
  58. --- ./libvncserver/main.c.orig 2010-09-20 14:10:23.000000000 -0400
  59. +++ ./libvncserver/main.c 2010-09-20 14:38:30.000000000 -0400
  60. @@ -464,7 +464,10 @@
  61. /* OK, now, to save bandwidth, wait a little while for more
  62. updates to come along. */
  63. - usleep(cl->screen->deferUpdateTime * 1000);
  64. + {
  65. + struct timespec ts = {.tv_sec = cl->screen->deferUpdateTime, .tv_nsec = 0};
  66. + nanosleep(&ts, NULL);
  67. + }
  68. /* Now, get the region we're going to update, and remove
  69. it from cl->modifiedRegion _before_ we send the update.