Commit Graph

30 Commits

Author SHA1 Message Date
Hauke Mehrtens
5c201be7d7 Add LDFLAGS when building libsparse.a
Respect the LDFALGS provided from the outside when linking libsparse.a

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2020-01-05 17:38:08 +01:00
Johannes Kimmel
ec17045ec0 make_ext4fs: fix build on musl systems
Include sys/sysmacros.h on all systems, except MACOS.

The previous change only included the header on glibc systems:
3af931b0b6

Signed-off-by: Johannes Kimmel <freifunk@mail.bareminimum.eu>
2019-12-07 14:49:14 +01:00
Rosen Penev
eebda1d55d make_ext4: Add strict prototypes.
Removes some undefined behavior.

Signed-off by: Rosen Penev <rosenp@gmail.com>
2017-05-29 08:44:46 +02:00
Rosen Penev
bb9cf91795 make_ext4fs: Remove off64_t in favor of standard off_t
This fixes building against cygwin which does not define off64_t. off_t
under modern versions of OS X(or macOS) defaults to 64-bit. Furthermore,
_FILE_OFFSET_BITS is defined to 64-bit which eliminates the need for
using off64_t directly. Also, musl just like OS X defines off_t as 64-bit
in all situations. Also removed some code related to this.

Signed-off by: Rosen Penev <rosenp@gmail.com>
2017-05-09 23:34:18 +02:00
Jo-Philipp Wich
484903e433 Allow creating empty filesystem images
Support creating empty filesystem images by making the source directory
argument optional.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2016-08-14 22:10:51 +02:00
Felix Fietkau
3af931b0b6 Only include sys/sysmacros.h on glibc, it is not portable
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-05-05 18:46:32 +01:00
Jo-Philipp Wich
bf98b86a5d Include sys/sysmacros.h explicitely.
Recent glibc versions do not expose major() and minor() without an explicit
include of sysmacros.h anymore, therefor add it.

Also remove duplicate types.h include while we're at it.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2016-04-25 11:58:47 +02:00
Wojtek Porczyk
bd53eaafbc make_ext4fs: explicitly call setlocale() before creating image
The alphasort(3) function, which is used as comparison function for
scandir(3) is locale dependent (at least in glibc, in which it defers to
strcoll(3)). This patch explicitly calls setlocale(3), setting the
locale to "C".

Currently, there are no other calls to setlocale(), so this does not
change the behaviour. However, we'd like to be sure that in the future
no-one will break that.

Signed-off-by: Wojtek Porczyk <woju@invisiblethingslab.com>
2015-12-02 17:05:03 +01:00
Jo-Philipp Wich
98e3d5c1ce Add option to link zlib statically
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-09-14 16:59:23 +02:00
Imre Kaloz
7c15bef6c7 avoid using libc's internal sys/cdefs.h
sha1.h simply shouldn't use it while sha1.c simply doesn't

Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
2015-05-01 18:13:00 +02:00
Jo-Philipp Wich
2f713da924 Remove unused function
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-04-08 07:51:39 +02:00
Jo-Philipp Wich
828ec043d2 Allow specifying reserved blocks percentage
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-04-08 07:51:39 +02:00
Jo-Philipp Wich
67cbf164c7 Remove unused mountpoint support
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-04-08 07:51:39 +02:00
Jo-Philipp Wich
e97166fc4a Remove unused functions
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-04-08 07:51:39 +02:00
Jo-Philipp Wich
d8400e132c Remove MinGW support code
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-04-08 07:51:39 +02:00
Jo-Philipp Wich
5e571bcba6 Remove dead selinux code
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-04-08 07:51:39 +02:00
Jo-Philipp Wich
af498dbd68 Support comments in fs config
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-04-08 07:51:39 +02:00
Jo-Philipp Wich
5bb3a9e3de Support tabs as seaprators when parsing fs config
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-04-08 07:51:39 +02:00
Jo-Philipp Wich
8597212da1 Fix fs configuration support
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-04-08 07:51:39 +02:00
Jo-Philipp Wich
5ba1807f75 Remove Android specific code paths
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-04-08 07:51:39 +02:00
Jo-Philipp Wich
fe8f2ce6f4 Remove references to O_BINARY
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-04-08 07:51:39 +02:00
Jo-Philipp Wich
fe3bfde910 Remove unused files
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-04-08 07:51:39 +02:00
Jo-Philipp Wich
2964e1c736 libsparse: remove unused files
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-04-08 07:51:39 +02:00
Jo-Philipp Wich
c657f39e16 Implement support for block and char dev nodes, fifos and sockets.
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-04-08 07:51:27 +02:00
Jo-Philipp Wich
62768dbac9 Add required Android includes
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-04-04 22:51:03 +02:00
Jo-Philipp Wich
f5c21f2b2c Add toplevel Makefile
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-04-04 22:49:53 +02:00
Jo-Philipp Wich
40550da058 libsparse: add Makefile
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-04-04 22:48:01 +02:00
Jo-Philipp Wich
e51257087e Import libsparse sources
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-04-04 22:47:39 +02:00
Jo-Philipp Wich
58ace71d8c Remove selinux support code
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-04-04 22:42:53 +02:00
Jo-Philipp Wich
fb5c011b49 Import make_ext4fs sources
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-04-04 22:26:16 +02:00