Skip to contentSkip to conversation

dosfstools: Fixed compilation with musl libc

PATCH New Maarten ter Huurne 2 participants 2 messages Sep 11, 2014 – Sep 28, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dosfstools: Fixed compilation with musl libc

The Makefile of dosfstools passes -D_GNU_SOURCE to get access to non-standard definitions such as 'loff_t'. But this flag got lost in the CFLAGS override.

---
 package/dosfstools/dosfstools.mk | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
package/dosfstools/dosfstools.mk +4 -1
index a6b83d0..a9d8392 100644
@@ -13,6 +13,8 @@ DOSFSTOOLS_LICENSE_FILES = COPYING
 # Avoid target dosfstools dependencies, no host-libiconv
 HOST_DOSFSTOOLS_DEPENDENCIES =
 
+DOSFSTOOLS_CFLAGS = $(TARGET_CFLAGS) -D_GNU_SOURCE
+
 ifneq ($(BR2_ENABLE_LOCALE),y)
 DOSFSTOOLS_DEPENDENCIES += libiconv
 DOSFSTOOLS_LDLIBS += -liconv
@@ -23,7 +25,8 @@ FSCK_FAT_BINARY = fsck.fat
 MKFS_FAT_BINARY = mkfs.fat
 
 define DOSFSTOOLS_BUILD_CMDS
-	$(MAKE) $(TARGET_CONFIGURE_OPTS) LDLIBS="$(DOSFSTOOLS_LDLIBS)" -C $(@D)
+	$(MAKE) $(TARGET_CONFIGURE_OPTS) \
+		CFLAGS="$(DOSFSTOOLS_CFLAGS)" LDLIBS="$(DOSFSTOOLS_LDLIBS)" -C $(@D)
 endef
 
 DOSFSTOOLS_INSTALL_BIN_FILES_$(BR2_PACKAGE_DOSFSTOOLS_FATLABEL)+=$(FATLABEL_BINARY)
Signature · 1 line
1.8.4.5
#1 lore raw

PATCH 1/1 dosfstools: Fixed compilation with musl libc

Quoted 5 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Maarten" == Maarten ter Huurne <[email protected]> writes:

The Makefile of dosfstools passes -D_GNU_SOURCE to get access to non-standard definitions such as 'loff_t'. But this flag got lost in the CFLAGS override.

You forgot to add your signed-off-by, but you've added it to the other patches so I took the liberty of adding it here, hopefully that is OK.

Committed with a slightly extended commit message, thanks.

Signature · 1 line
Bye, Peter Korsgaard