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.

49 lines
1.5 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../gdb/legacy_sus.patch
  5. # Copyright (C) 2010 - 2014 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. --- a/gdb/linux-nat.c 2013-12-08 05:33:13.000000000 +0100
  19. +++ b/gdb/linux-nat.c 2014-01-30 14:22:29.774178121 +0100
  20. @@ -68,6 +68,8 @@
  21. #include "buffer.h"
  22. #include "target-descriptions.h"
  23. +#include <time.h> /* for nanosleep */
  24. +
  25. #ifndef SPUFS_MAGIC
  26. #define SPUFS_MAGIC 0x23c9b64e
  27. #endif
  28. @@ -633,6 +635,7 @@
  29. sigset_t prev_mask;
  30. int has_vforked;
  31. int parent_pid, child_pid;
  32. + struct timespec t;
  33. block_child_signals (&prev_mask);
  34. @@ -842,7 +845,9 @@
  35. "LCFF: no VFORK_DONE "
  36. "support, sleeping a bit\n");
  37. - usleep (10000);
  38. + t.tv_sec = 0;
  39. + t.tv_nsec = 10000000L;
  40. + nanosleep(&t, NULL);
  41. /* Pretend we've seen a PTRACE_EVENT_VFORK_DONE event,
  42. and leave it pending. The next linux_nat_resume call