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.

39 lines
1.3 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../sfdisk/sfdisk.010.index-rindex-fix.patch
  5. # Copyright (C) 2011 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. Imported from buildroot
  17. http://git.uclibc.org/buildroot/tree/package/sfdisk
  18. --- sfdisk_llseek-fix/sfdisk.c 2008-04-17 08:42:35.000000000 +0000
  19. +++ sfdisk_index-rindex-fix/sfdisk.c 2008-04-17 09:50:17.000000000 +0000
  20. @@ -58,6 +58,17 @@
  21. #define SIZE(a) (sizeof(a)/sizeof(a[0]))
  22. +/*
  23. + * Why these wouldn't be defined in string.h, I don't know, there is a block
  24. + * testing for BSD, and no other mention of these functions ... NK
  25. + */
  26. +#if !defined(index)
  27. +# define index(s,c) strchr((s), (c))
  28. +#endif
  29. +#if !defined(rindex)
  30. +# define rindex(s,c) strrchr((s), (c))
  31. +#endif
  32. +
  33. /*
  34. * Table of contents:
  35. * A. About seeking