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.

65 lines
2.3 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../gpm/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. --- ./src/mice.c.orig 2010-09-20 12:32:15.000000000 -0400
  19. +++ ./src/mice.c 2010-09-20 12:30:45.000000000 -0400
  20. @@ -77,6 +77,12 @@
  21. #include "headers/synaptics.h"
  22. #include "headers/message.h"
  23. +#define usleep(usec) x_usleep(usec)
  24. +static inline int x_usleep(useconds_t usec)
  25. +{
  26. + struct timespec t = { usec/1000000, (usec%1000000)*1000L };
  27. + return nanosleep(&t, NULL);
  28. +}
  29. /*========================================================================*/
  30. /* Parsing argv: helper dats struct function (should they get elsewhere?) */
  31. --- ./src/synaptics.c.orig 2010-09-20 12:38:35.000000000 -0400
  32. +++ ./src/synaptics.c 2010-09-20 12:40:16.000000000 -0400
  33. @@ -2239,6 +2239,12 @@
  34. ****************************************************************************/
  35. +#define usleep(usec) x_usleep(usec)
  36. +static inline int x_usleep(useconds_t usec)
  37. +{
  38. + struct timespec t = { usec/1000000, (usec%1000000)*1000L };
  39. + return nanosleep(&t, NULL);
  40. +}
  41. static unsigned char tp_hextoint (unsigned char byte1,
  42. --- ./src/prog/mouse-test.c.orig 2010-09-20 13:34:22.000000000 -0400
  43. +++ ./src/prog/mouse-test.c 2010-09-20 13:35:31.000000000 -0400
  44. @@ -103,6 +103,13 @@
  45. #define GOTOXY(f,x,y) fprintf(f,"\x1B[%03i;%03iH",y,x)
  46. +#define usleep(usec) x_usleep(usec)
  47. +static inline int x_usleep(useconds_t usec)
  48. +{
  49. + struct timespec t = { usec/1000000, (usec%1000000)*1000L };
  50. + return nanosleep(&t, NULL);
  51. +}
  52. +
  53. /*-----------------------------------------------------------------------------
  54. Place the description here.
  55. -----------------------------------------------------------------------------*/