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.

48 lines
1.8 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../musl/pkg/kmod/kmod-test-glibc-assumption.patch
  5. # Copyright (C) 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. This patch comes from sabotagelinux
  17. https://github.com/sabotage-linux/sabotage/blob/master/KEEP/kmod-test-glibc-assumption.patch
  18. check if __GLIBC__ is defined before using _FILE_OFFSET_BITS
  19. _FILE_OFFSET_BITS is a glibc internal macro.
  20. musl provides 64bit off_t by default, but
  21. defines stat64 etc as macros to make glibc-centric
  22. programs happy. however the expansion causes
  23. problems with the hack used here to work around
  24. glibc's 32bit past...
  25. --- kmod-15.org/testsuite/path.c 2013-08-26 16:03:22.239000003 +0000
  26. +++ kmod-15/testsuite/path.c 2013-08-26 16:11:36.939000003 +0000
  27. @@ -185,7 +185,7 @@
  28. WRAP_2ARGS(int, -1, access, int);
  29. WRAP_2ARGS(int, -1, stat, struct stat*);
  30. WRAP_2ARGS(int, -1, lstat, struct stat*);
  31. -#ifndef _FILE_OFFSET_BITS
  32. +#if defined(__GLIBC__) && !defined(_FILE_OFFSET_BITS)
  33. WRAP_2ARGS(int, -1, stat64, struct stat64*);
  34. WRAP_2ARGS(int, -1, lstat64, struct stat64*);
  35. WRAP_OPEN(64);
  36. @@ -196,7 +196,7 @@
  37. #ifdef HAVE___XSTAT
  38. WRAP_VERSTAT(__x,);
  39. WRAP_VERSTAT(__lx,);
  40. -#ifndef _FILE_OFFSET_BITS
  41. +#if defined(__GLIBC__) && !defined(_FILE_OFFSET_BITS)
  42. WRAP_VERSTAT(__x,64);
  43. WRAP_VERSTAT(__lx,64);
  44. #endif