squashfs3-3.4-get_nprocs.patch 1.0 KB

123456789101112131415161718192021222324252627282930313233
  1. squashfs3: fix build with uClibc
  2. The squashfs3 package uses the old get_nprocs() GNU extension which does not
  3. exist in uClibc. This has already been fixed in newer squashfs releases
  4. (>=4.0).
  5. Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
  6. Index: squashfs3-3.4/squashfs-tools/mksquashfs.c
  7. ===================================================================
  8. --- squashfs3-3.4.orig/squashfs-tools/mksquashfs.c
  9. +++ squashfs3-3.4/squashfs-tools/mksquashfs.c
  10. @@ -3178,7 +3178,7 @@ void initialise_threads()
  11. processors = 1;
  12. }
  13. #else
  14. - processors = get_nprocs();
  15. + processors = sysconf(_SC_NPROCESSORS_CONF);
  16. #endif
  17. }
  18. Index: squashfs3-3.4/squashfs-tools/unsquashfs.c
  19. ===================================================================
  20. --- squashfs3-3.4.orig/squashfs-tools/unsquashfs.c
  21. +++ squashfs3-3.4/squashfs-tools/unsquashfs.c
  22. @@ -2428,7 +2428,7 @@ void initialise_threads(int fragment_buf
  23. processors = 1;
  24. }
  25. #else
  26. - processors = get_nprocs();
  27. + processors = sysconf(_SC_NPROCESSORS_CONF);
  28. #endif
  29. }