From c5274b1d255ffbff82a86a5e29b284688344af38 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 28 Jun 2012 14:36:53 -0700 Subject: uclibc: Separate the bits between uclibc and uclibc-initial uclibc and uclibc-initial were providing conflicting PROVIDES separate the common bits into logical pieces. Create a common inc file to hold package information and version specific includes so correct logical units can be included in uclibc and uclibc-initial recipes. (From OE-Core rev: bdfd2f6f286889b8920ebf6a670542b26534c1cb) Signed-off-by: Khem Raj Signed-off-by: Richard Purdie --- .../uclibc/uclibc-git/utmp-locking.patch | 106 +++++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 meta/recipes-core/uclibc/uclibc-git/utmp-locking.patch (limited to 'meta/recipes-core/uclibc/uclibc-git/utmp-locking.patch') diff --git a/meta/recipes-core/uclibc/uclibc-git/utmp-locking.patch b/meta/recipes-core/uclibc/uclibc-git/utmp-locking.patch new file mode 100644 index 0000000000..85efaf2260 --- /dev/null +++ b/meta/recipes-core/uclibc/uclibc-git/utmp-locking.patch @@ -0,0 +1,106 @@ +diff --git a/libc/misc/utmp/utent.c b/libc/misc/utmp/utent.c +index 136ac69..a35bb2b 100644 +--- a/libc/misc/utmp/utent.c ++++ b/libc/misc/utmp/utent.c +@@ -34,7 +34,7 @@ static const char default_file_name[] = _PATH_UTMP; + static const char *static_ut_name = default_file_name; + + /* This function must be called with the LOCK held */ +-static void __setutent_nolock(void) ++static void __setutent_unlocked(void) + { + if (static_fd < 0) { + static_fd = open_not_cancel_2(static_ut_name, O_RDWR | O_CLOEXEC); +@@ -56,12 +56,12 @@ static void __setutent_nolock(void) + static void __setutent(void) + { + __UCLIBC_MUTEX_LOCK(utmplock); +- __setutent_nolock(); ++ __setutent_unlocked(); + __UCLIBC_MUTEX_UNLOCK(utmplock); + } + #else + static void __setutent(void); +-strong_alias(__setutent_nolock,__setutent) ++strong_alias(__setutent_unlocked,__setutent) + #endif + strong_alias(__setutent,setutent) + +@@ -70,7 +70,7 @@ strong_alias(__setutent,setutxent) + #endif + + /* This function must be called with the LOCK held */ +-static struct utmp *__getutent_lock(void) ++static struct utmp *__getutent_unlocked(void) + { + if (static_fd < 0) { + __setutent(); +@@ -91,13 +91,13 @@ static struct utmp *__getutent(void) + struct utmp *ret; + + __UCLIBC_MUTEX_LOCK(utmplock); +- ret = __getutent_lock(); ++ ret = __getutent_unlocked(); + __UCLIBC_MUTEX_UNLOCK(utmplock); + return ret; + } + #else + static struct utmp *__getutent(void); +-strong_alias(__getutent_lock,__getutent) ++strong_alias(__getutent_unlocked,__getutent) + #endif + strong_alias(__getutent,getutent) + +@@ -123,7 +123,7 @@ strong_alias(__endutent,endutxent) + #endif + + /* This function must be called with the LOCK held */ +-static struct utmp *__getutid_lock(const struct utmp *utmp_entry) ++static struct utmp *__getutid_unlocked(const struct utmp *utmp_entry) + { + struct utmp *lutmp; + unsigned type; +@@ -133,7 +133,7 @@ static struct utmp *__getutid_lock(const struct utmp *utmp_entry) + type = utmp_entry->ut_type - 1; + type /= 4; + +- while ((lutmp = __getutent()) != NULL) { ++ while ((lutmp = __getutent_unlocked()) != NULL) { + if (type == 0 && lutmp->ut_type == utmp_entry->ut_type) { + /* one of RUN_LVL, BOOT_TIME, NEW_TIME, OLD_TIME */ + return lutmp; +@@ -152,13 +152,13 @@ static struct utmp *__getutid(const struct utmp *utmp_entry) + struct utmp *ret; + + __UCLIBC_MUTEX_LOCK(utmplock); +- ret = __getutid_lock(utmp_entry); ++ ret = __getutid_unlocked(utmp_entry); + __UCLIBC_MUTEX_UNLOCK(utmplock); + return ret; + } + #else + static struct utmp *__getutid(const struct utmp *utmp_entry); +-strong_alias(__getutid_lock,__getutid) ++strong_alias(__getutid_unlocked,__getutid) + #endif + strong_alias(__getutid,getutid) + +@@ -174,7 +174,7 @@ static struct utmp *__getutline(const struct utmp *utmp_entry) + struct utmp *lutmp; + + __UCLIBC_MUTEX_LOCK(utmplock); +- while ((lutmp = __getutent()) != NULL) { ++ while ((lutmp = __getutent_unlocked()) != NULL) { + if (lutmp->ut_type == USER_PROCESS || lutmp->ut_type == LOGIN_PROCESS) { + if (strncmp(lutmp->ut_line, utmp_entry->ut_line, sizeof(lutmp->ut_line)) == 0) { + break; +@@ -200,7 +200,7 @@ static struct utmp *__pututline(const struct utmp *utmp_entry) + the file pointer where they want it, everything will work out. */ + lseek(static_fd, (off_t) - sizeof(struct utmp), SEEK_CUR); + +- if (__getutid(utmp_entry) != NULL) ++ if (__getutid_unlocked(utmp_entry) != NULL) + lseek(static_fd, (off_t) - sizeof(struct utmp), SEEK_CUR); + else + lseek(static_fd, (off_t) 0, SEEK_END); + -- cgit v1.2.3-54-g00ecf