qt5base-uclibc-no-lfs.patch 1.3 KB

123456789101112131415161718192021222324252627282930313233343536
  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. Moved to qt5 by Thomas Petazzoni.
  14. Reported-Upstream: https://bugreports.qt-project.org/browse/QTBUG-25321
  15. Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
  16. Index: b/mkspecs/common/posix/qplatformdefs.h
  17. ===================================================================
  18. --- a/mkspecs/common/posix/qplatformdefs.h
  19. +++ b/mkspecs/common/posix/qplatformdefs.h
  20. @@ -123,7 +123,11 @@
  21. #define QT_READ ::read
  22. #define QT_WRITE ::write
  23. +#ifdef QT_LARGEFILE_SUPPORT
  24. #define QT_OPEN_LARGEFILE O_LARGEFILE
  25. +#else
  26. +#define QT_OPEN_LARGEFILE 0
  27. +#endif
  28. #define QT_OPEN_RDONLY O_RDONLY
  29. #define QT_OPEN_WRONLY O_WRONLY
  30. #define QT_OPEN_RDWR O_RDWR