dosfstools: Fix build with musl

We need to pass _GNU_SOURCE and include fcntl.h

Change-Id: Ice0597ddac3b275400880d85793ece4b300bec9b
(From OE-Core rev: 022a96c7a396bd6bbf499984f4ea8639111fe3b7)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Khem Raj
2015-04-15 19:00:21 -07:00
committed by Richard Purdie
parent 5688e6c739
commit c94d444c79
2 changed files with 45 additions and 1 deletions

View File

@@ -0,0 +1,41 @@
From b7c42c6a9829bea911b22201edd7df2a9bec1a14 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 13 Apr 2015 17:52:34 -0700
Subject: [PATCH] Include fcntl.h for getting loff_t definition
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
dosfsck/dosfsck.h | 2 ++
dosfsck/lfn.c | 1 +
2 files changed, 3 insertions(+)
diff --git a/dosfsck/dosfsck.h b/dosfsck/dosfsck.h
index d9314b1..2076d5f 100644
--- a/dosfsck/dosfsck.h
+++ b/dosfsck/dosfsck.h
@@ -50,6 +50,8 @@
#define CT_LE_L(v) (v)
#endif /* __BIG_ENDIAN */
+#include <fcntl.h>
+
#define VFAT_LN_ATTR (ATTR_RO | ATTR_HIDDEN | ATTR_SYS | ATTR_VOLUME)
/* ++roman: Use own definition of boot sector structure -- the kernel headers'
diff --git a/dosfsck/lfn.c b/dosfsck/lfn.c
index 9b2cfc3..bb04fda 100644
--- a/dosfsck/lfn.c
+++ b/dosfsck/lfn.c
@@ -7,6 +7,7 @@
#include <string.h>
#include <limits.h>
#include <time.h>
+#include <fcntl.h>
#include "common.h"
#include "io.h"
--
2.1.4

View File

@@ -17,7 +17,9 @@ SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/${BPN}/${BP}.src.tar.gz/407d4
file://dosfstools-msdos_fs-types.patch \
file://include-linux-types.patch \
file://nofat32_autoselect.patch \
file://fix_populated_dosfs_creation.patch "
file://fix_populated_dosfs_creation.patch \
file://0001-Include-fcntl.h-for-getting-loff_t-definition.patch \
"
SRC_URI[md5sum] = "407d405ade410f7597d364ab5dc8c9f6"
SRC_URI[sha256sum] = "0eac6d12388b3d9ed78684529c1b0d9346fa2abbe406c4d4a3eb5a023c98a484"
@@ -26,6 +28,7 @@ SRC_URI[sha256sum] = "0eac6d12388b3d9ed78684529c1b0d9346fa2abbe406c4d4a3eb5a023c
# add this in here to for sure allow for big files.
#
CFLAGS_append = " -D_FILE_OFFSET_BITS=64"
CFLAGS_append_libc-musl = " -D_GNU_SOURCE"
do_install () {
oe_runmake "PREFIX=${D}" "SBINDIR=${D}${base_sbindir}" \