qt-uClibc-lfs-fix.patch 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. From 6f88b27de256266947a7f6a3e70e18510754aab2 Mon Sep 17 00:00:00 2001
  2. From: Peter Korsgaard <jacmet@sunsite.dk>
  3. Date: Sat, 14 Apr 2012 20:36:07 +0200
  4. Subject: [PATCH] mkspecs/common/posix: fix !largefile builds on uClibc
  5. uClibc doesn't even define O_LARGEFILE when not configured with large file
  6. support, so ensure this define is only used when Qt is built with
  7. -largefile, otherwise the build fails with:
  8. io/qtemporaryfile.cpp: In function 'bool createFileFromTemplate(
  9. NativeFileHandle&, QFileSystemEntry::NativePath&, size_t, size_t,
  10. QSystemError&)':
  11. io/qtemporaryfile.cpp:197:57: error: 'O_LARGEFILE' was not declared in
  12. this scope
  13. Reported-Upstream: https://bugreports.qt-project.org/browse/QTBUG-25321
  14. Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
  15. ---
  16. mkspecs/common/posix/qplatformdefs.h | 5 +++++
  17. 1 files changed, 5 insertions(+), 0 deletions(-)
  18. diff --git a/mkspecs/common/posix/qplatformdefs.h b/mkspecs/common/posix/qplatformdefs.h
  19. index daecc00..8a796cf 100644
  20. --- a/mkspecs/common/posix/qplatformdefs.h
  21. +++ b/mkspecs/common/posix/qplatformdefs.h
  22. @@ -123,7 +123,12 @@
  23. #define QT_READ ::read
  24. #define QT_WRITE ::write
  25. +#ifdef QT_LARGEFILE_SUPPORT
  26. #define QT_OPEN_LARGEFILE O_LARGEFILE
  27. +#else
  28. +#define QT_OPEN_LARGEFILE 0
  29. +#endif
  30. +
  31. #define QT_OPEN_RDONLY O_RDONLY
  32. #define QT_OPEN_WRONLY O_WRONLY
  33. #define QT_OPEN_RDWR O_RDWR
  34. --
  35. 1.7.8.3