Signed-off-by: Luka Perkov <luka@openwrt.org> SVN-Revision: 40010master
parent
deec514607
commit
bf98d81259
@ -1,44 +0,0 @@ |
||||
--- a/misc-utils/cal.c
|
||||
+++ b/misc-utils/cal.c
|
||||
@@ -291,41 +291,6 @@ main(int argc, char **argv) {
|
||||
}
|
||||
#endif
|
||||
|
||||
-/*
|
||||
- * The traditional Unix cal utility starts the week at Sunday,
|
||||
- * while ISO 8601 starts at Monday. We read the start day from
|
||||
- * the locale database, which can be overridden with the
|
||||
- * -s (Sunday) or -m (Monday) options.
|
||||
- */
|
||||
-#if HAVE_DECL__NL_TIME_WEEK_1STDAY
|
||||
- /*
|
||||
- * You need to use 2 locale variables to get the first day of the week.
|
||||
- * This is needed to support first_weekday=2 and first_workday=1 for
|
||||
- * the rare case where working days span across 2 weeks.
|
||||
- * This shell script shows the combinations and calculations involved:
|
||||
- *
|
||||
- * for LANG in en_US ru_RU fr_FR csb_PL POSIX; do
|
||||
- * printf "%s:\t%s + %s -1 = " $LANG $(locale week-1stday first_weekday)
|
||||
- * date -d"$(locale week-1stday) +$(($(locale first_weekday)-1))day" +%w
|
||||
- * done
|
||||
- *
|
||||
- * en_US: 19971130 + 1 -1 = 0 #0 = sunday
|
||||
- * ru_RU: 19971130 + 2 -1 = 1
|
||||
- * fr_FR: 19971201 + 1 -1 = 1
|
||||
- * csb_PL: 19971201 + 2 -1 = 2
|
||||
- * POSIX: 19971201 + 7 -1 = 0
|
||||
- */
|
||||
- {
|
||||
- int wfd;
|
||||
- union { unsigned int word; char *string; } val;
|
||||
- val.string = nl_langinfo(_NL_TIME_WEEK_1STDAY);
|
||||
-
|
||||
- wfd = val.word;
|
||||
- wfd = day_in_week(wfd % 100, (wfd / 100) % 100, wfd / (100 * 100));
|
||||
- weekstart = (wfd + *nl_langinfo(_NL_TIME_FIRST_WEEKDAY) - 1) % 7;
|
||||
- }
|
||||
-#endif
|
||||
-
|
||||
yflag = 0;
|
||||
while ((ch = getopt_long(argc, argv, "13mjsyVh", longopts, NULL)) != -1)
|
||||
switch(ch) {
|
@ -1,13 +0,0 @@ |
||||
Index: util-linux-2.21.2/libblkid/src/superblocks/swap.c
|
||||
===================================================================
|
||||
--- util-linux-2.21.2.orig/libblkid/src/superblocks/swap.c 2012-05-15 13:51:45.814410455 +0200
|
||||
+++ util-linux-2.21.2/libblkid/src/superblocks/swap.c 2013-06-12 23:23:03.270742199 +0200
|
||||
@@ -48,7 +48,7 @@
|
||||
|
||||
/* SWAPSPACE2 - check for wrong version or zeroed pagecount */
|
||||
if (strcmp(version, "2") == 0 &&
|
||||
- (hdr->version != 1 || hdr->lastpage == 0))
|
||||
+ ((hdr->version != 1 && swab32(hdr->version) != 1) || hdr->lastpage == 0))
|
||||
return -1;
|
||||
|
||||
/* arbitrary sanity check.. is there any garbage down there? */
|
@ -0,0 +1,65 @@ |
||||
Support older hosts with latest util-linux-native
|
||||
|
||||
mkostemp is not defined on older machines. So we detect this and
|
||||
provide a define that uses mkstemp instead.
|
||||
|
||||
O_CLOEXEC is not defined on older machines. It is however defined
|
||||
in the 'c.h' header. Fix up the users to include 'c.h'.
|
||||
|
||||
fdisks/fdisksunlabel.c was modified to use qsort_r, however
|
||||
this is not defined on older hosts. Revert:
|
||||
commit c69bbca9c1f6645097bd20fe3a21f5a99a2a0698
|
||||
fdisk: (sun): use ask API, remove global variable
|
||||
|
||||
Upstream-Status: Inappropriate [other]
|
||||
Patches revert upstream changes in order to support older
|
||||
machines.
|
||||
|
||||
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
|
||||
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -299,6 +299,7 @@ AC_CHECK_FUNCS([ \
|
||||
llseek \
|
||||
lseek64 \
|
||||
mempcpy \
|
||||
+ mkostemp \
|
||||
nanosleep \
|
||||
personality \
|
||||
posix_fadvise \
|
||||
--- a/include/c.h
|
||||
+++ b/include/c.h
|
||||
@@ -236,6 +236,13 @@ static inline int dirfd(DIR *d)
|
||||
#endif
|
||||
|
||||
/*
|
||||
+ * mkostemp replacement
|
||||
+ */
|
||||
+#ifndef HAVE_MKOSTEMP
|
||||
+#define mkostemp(template, flags) mkstemp(template)
|
||||
+#endif
|
||||
+
|
||||
+/*
|
||||
* MAXHOSTNAMELEN replacement
|
||||
*/
|
||||
static inline size_t get_hostname_max(void)
|
||||
--- a/lib/randutils.c
|
||||
+++ b/lib/randutils.c
|
||||
@@ -16,6 +16,7 @@
|
||||
#include <sys/syscall.h>
|
||||
|
||||
#include "randutils.h"
|
||||
+#include "c.h"
|
||||
|
||||
#ifdef HAVE_TLS
|
||||
#define THREAD_LOCAL static __thread
|
||||
--- a/lib/wholedisk.c
|
||||
+++ b/lib/wholedisk.c
|
||||
@@ -10,6 +10,7 @@
|
||||
|
||||
#include "blkdev.h"
|
||||
#include "wholedisk.h"
|
||||
+#include "c.h"
|
||||
|
||||
int is_whole_disk_fd(int fd, const char *name)
|
||||
{
|
Loading…
Reference in new issue