summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2015-10-16 00:50:20 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-10-27 07:24:26 +0000
commit73e1d33cf10b06c882f6f1d152e615e698431a49 (patch)
tree4c104d7205e91c6ef76c093f7f3384143654b7eb
parent2e4575d2e87022eee3262279df0c53f7733b52ef (diff)
downloadpoky-73e1d33cf10b06c882f6f1d152e615e698431a49.tar.gz
uclibc: Implement syncfs and AT_EMPTY_PATH for all and O_PATH for arm
needed for systemd 225 to compile with uclibc Change-Id: Id5f990edf4a773de49742f9f9ea5139e55e21f69 (From OE-Core rev: 5c515a1c7a86c510b6ae4f99c5b2e20d52622543) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-core/uclibc/uclibc-git.inc2
-rw-r--r--meta/recipes-core/uclibc/uclibc-git/0001-fcntl-Add-AT_EMPTY_PATH-for-all-and-O_PATH-for-arm.patch42
-rw-r--r--meta/recipes-core/uclibc/uclibc-git/0001-wire-in-syncfs.patch49
3 files changed, 93 insertions, 0 deletions
diff --git a/meta/recipes-core/uclibc/uclibc-git.inc b/meta/recipes-core/uclibc/uclibc-git.inc
index 9e3d64408c..dcb616d0d2 100644
--- a/meta/recipes-core/uclibc/uclibc-git.inc
+++ b/meta/recipes-core/uclibc/uclibc-git.inc
@@ -17,5 +17,7 @@ SRC_URI = "git://uclibc.org/uClibc.git;branch=master \
17 file://0006-ldso-limited-support-for-ORIGIN-in-rpath.patch \ 17 file://0006-ldso-limited-support-for-ORIGIN-in-rpath.patch \
18 file://0007-nptl-atfork-Hide-pthread_atfork-in-shared-versions.patch \ 18 file://0007-nptl-atfork-Hide-pthread_atfork-in-shared-versions.patch \
19 file://0001-gcc5-optimizes-away-the-write-only-static-functions-.patch \ 19 file://0001-gcc5-optimizes-away-the-write-only-static-functions-.patch \
20 file://0001-fcntl-Add-AT_EMPTY_PATH-for-all-and-O_PATH-for-arm.patch \
21 file://0001-wire-in-syncfs.patch \
20" 22"
21S = "${WORKDIR}/git" 23S = "${WORKDIR}/git"
diff --git a/meta/recipes-core/uclibc/uclibc-git/0001-fcntl-Add-AT_EMPTY_PATH-for-all-and-O_PATH-for-arm.patch b/meta/recipes-core/uclibc/uclibc-git/0001-fcntl-Add-AT_EMPTY_PATH-for-all-and-O_PATH-for-arm.patch
new file mode 100644
index 0000000000..6942db4624
--- /dev/null
+++ b/meta/recipes-core/uclibc/uclibc-git/0001-fcntl-Add-AT_EMPTY_PATH-for-all-and-O_PATH-for-arm.patch
@@ -0,0 +1,42 @@
1From 4c8f5fe7d41493e8e181941ae5a01713155f44d1 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 15 Oct 2015 15:34:39 +0000
4Subject: [PATCH] fcntl: Add AT_EMPTY_PATH for all and O_PATH for arm
5
6Signed-off-by: Khem Raj <raj.khem@gmail.com>
7---
8Upstream-Status: Pending
9
10 include/fcntl.h | 3 +++
11 libc/sysdeps/linux/arm/bits/fcntl.h | 1 +
12 2 files changed, 4 insertions(+)
13
14diff --git a/include/fcntl.h b/include/fcntl.h
15index 11000dd..8a7ad9b 100644
16--- a/include/fcntl.h
17+++ b/include/fcntl.h
18@@ -65,6 +65,9 @@ __BEGIN_DECLS
19 # define AT_SYMLINK_FOLLOW 0x400 /* Follow symbolic links. */
20 # define AT_EACCESS 0x200 /* Test access permitted for
21 effective IDs, not real IDs. */
22+# ifdef __USE_GNU
23+# define AT_EMPTY_PATH 0x1000 /* Allow empty relative pathname. */
24+# endif
25 #endif
26
27 /* Do the file control operation described by CMD on FD.
28diff --git a/libc/sysdeps/linux/arm/bits/fcntl.h b/libc/sysdeps/linux/arm/bits/fcntl.h
29index aedc154..c6ba958 100644
30--- a/libc/sysdeps/linux/arm/bits/fcntl.h
31+++ b/libc/sysdeps/linux/arm/bits/fcntl.h
32@@ -50,6 +50,7 @@
33 # define O_DIRECT 0200000 /* Direct disk access. */
34 # define O_NOATIME 01000000 /* Do not set atime. */
35 # define O_CLOEXEC 02000000 /* Set close_on_exec. */
36+# define O_PATH 010000000 /* Resolve pathname but do not open file. */
37 #endif
38
39 /* For now Linux has synchronisity options for data and read operations.
40--
412.6.1
42
diff --git a/meta/recipes-core/uclibc/uclibc-git/0001-wire-in-syncfs.patch b/meta/recipes-core/uclibc/uclibc-git/0001-wire-in-syncfs.patch
new file mode 100644
index 0000000000..079ad6b3b4
--- /dev/null
+++ b/meta/recipes-core/uclibc/uclibc-git/0001-wire-in-syncfs.patch
@@ -0,0 +1,49 @@
1From 4f2db1b46bda5e376245ec36198b137709f069e8 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 15 Oct 2015 17:03:37 +0000
4Subject: [PATCH] wire in syncfs
5
6Signed-off-by: Khem Raj <raj.khem@gmail.com>
7---
8Upstream-Status: Pending
9
10 include/unistd.h | 2 +-
11 libc/sysdeps/linux/common/syncfs.c | 13 +++++++++++++
12 2 files changed, 14 insertions(+), 1 deletion(-)
13 create mode 100644 libc/sysdeps/linux/common/syncfs.c
14
15diff --git a/include/unistd.h b/include/unistd.h
16index 3793d2d..d01bb08 100644
17--- a/include/unistd.h
18+++ b/include/unistd.h
19@@ -1073,7 +1073,7 @@ extern char *getpass (const char *__prompt) __nonnull ((1));
20 extern int fsync (int __fd);
21 #endif /* Use BSD || X/Open || Unix98. */
22
23-#if 0 /*def __USE_GNU */
24+#ifdef __USE_GNU
25 /* Make all changes done to all files on the file system associated
26 * with FD actually appear on disk. */
27 extern int syncfs (int __fd) __THROW;
28diff --git a/libc/sysdeps/linux/common/syncfs.c b/libc/sysdeps/linux/common/syncfs.c
29new file mode 100644
30index 0000000..d2eed05
31--- /dev/null
32+++ b/libc/sysdeps/linux/common/syncfs.c
33@@ -0,0 +1,13 @@
34+/* vi: set sw=4 ts=4: */
35+/*
36+ * fsync() for uClibc
37+ *
38+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
39+ *
40+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
41+ */
42+
43+#include <sys/syscall.h>
44+#include <unistd.h>
45+
46+_syscall1(int, syncfs, int, fd)
47--
482.6.1
49