summaryrefslogtreecommitdiff
path: root/package/squashfs/squashfs-4.0-mksquashfs-get_nprocs.patch
diff options
context:
space:
mode:
authorPeter Korsgaard <jacmet@sunsite.dk>2010-06-17 22:45:22 +0200
committerPeter Korsgaard <jacmet@sunsite.dk>2010-06-17 22:45:22 +0200
commitdfa2a513e1aa7f6ec47f630c5d31d98cd098f408 (patch)
tree901e8de214b3fb3145feffa4534bcd28d2642079 /package/squashfs/squashfs-4.0-mksquashfs-get_nprocs.patch
parent4f3f291a3bfc1893cbfb4d9803c35a4f6752784d (diff)
squashfs: fix build with uClibc
squashfs used the get_nprocs() GNU extension, instead of directly calling sysconf(), breaking the build on uClibc. Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'package/squashfs/squashfs-4.0-mksquashfs-get_nprocs.patch')
-rw-r--r--package/squashfs/squashfs-4.0-mksquashfs-get_nprocs.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/package/squashfs/squashfs-4.0-mksquashfs-get_nprocs.patch b/package/squashfs/squashfs-4.0-mksquashfs-get_nprocs.patch
new file mode 100644
index 000000000..8a1992375
--- /dev/null
+++ b/package/squashfs/squashfs-4.0-mksquashfs-get_nprocs.patch
@@ -0,0 +1,37 @@
+[PATCH] squashfs-tools: Don't use get_nprocs()
+
+get_nprocs() is a GNU extension, not supported on E.G. uClibc. It is a
+simple wrapper around sysconf(_SC_NPROCESSORS_CONF), so use that instead.
+
+Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
+---
+ squashfs-tools/mksquashfs.c | 2 +-
+ squashfs-tools/unsquashfs.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+Index: squashfs4.0/squashfs-tools/mksquashfs.c
+===================================================================
+--- squashfs4.0.orig/squashfs-tools/mksquashfs.c
++++ squashfs4.0/squashfs-tools/mksquashfs.c
+@@ -3705,7 +3705,7 @@ void initialise_threads()
+ processors = 1;
+ }
+ #else
+- processors = get_nprocs();
++ processors = sysconf(_SC_NPROCESSORS_CONF);
+ #endif
+ }
+
+Index: squashfs4.0/squashfs-tools/unsquashfs.c
+===================================================================
+--- squashfs4.0.orig/squashfs-tools/unsquashfs.c
++++ squashfs4.0/squashfs-tools/unsquashfs.c
+@@ -1811,7 +1811,7 @@ void initialise_threads(int fragment_buf
+ processors = 1;
+ }
+ #else
+- processors = get_nprocs();
++ processors = sysconf(_SC_NPROCESSORS_CONF);
+ #endif
+ }
+