diff -Nru bsdmainutils-9.0.6ubuntu2/debian/changelog bsdmainutils-9.0.6ubuntu3/debian/changelog --- bsdmainutils-9.0.6ubuntu2/debian/changelog 2016-02-07 09:39:42.000000000 +0000 +++ bsdmainutils-9.0.6ubuntu3/debian/changelog 2016-03-01 11:34:47.000000000 +0000 @@ -1,3 +1,9 @@ +bsdmainutils (9.0.6ubuntu3) xenial; urgency=medium + + * Fix ncal on big-endian platforms. LP: #1549850. + + -- Dimitri John Ledkov Tue, 01 Mar 2016 11:34:26 +0000 + bsdmainutils (9.0.6ubuntu2) xenial; urgency=medium * No-change rebuild for ncurses6 transition. diff -Nru bsdmainutils-9.0.6ubuntu2/debian/patches/fix-big-1stweek.patch bsdmainutils-9.0.6ubuntu3/debian/patches/fix-big-1stweek.patch --- bsdmainutils-9.0.6ubuntu2/debian/patches/fix-big-1stweek.patch 1970-01-01 00:00:00.000000000 +0000 +++ bsdmainutils-9.0.6ubuntu3/debian/patches/fix-big-1stweek.patch 2016-03-01 11:37:13.000000000 +0000 @@ -0,0 +1,20 @@ +Description: fix retreiving non-standard _NL_TIME_WEEK_1STDAY +Bug-Ubuntu: https://bugs.launchpad.net/glibc/+bug/1549850 +Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=11828 + +Index: bsdmainutils-9.0.6ubuntu3/usr.bin/ncal/ncal.c +=================================================================== +--- bsdmainutils-9.0.6ubuntu3.orig/usr.bin/ncal/ncal.c ++++ bsdmainutils-9.0.6ubuntu3/usr.bin/ncal/ncal.c +@@ -263,7 +263,10 @@ main(int argc, char *argv[]) + date first_week_d; + date sunday = { .y = 1997, .m = 11, .d = 30 }; + +- first_week_i = (intptr_t) nl_langinfo(_NL_TIME_WEEK_1STDAY); ++ union { char *str; unsigned int word; } u; ++ u.str = nl_langinfo(_NL_TIME_WEEK_1STDAY); ++ ++ first_week_i = u.word; + first_week_d.d = first_week_i % 100; + first_week_i /= 100; + first_week_d.m = first_week_i % 100; diff -Nru bsdmainutils-9.0.6ubuntu2/debian/patches/series bsdmainutils-9.0.6ubuntu3/debian/patches/series --- bsdmainutils-9.0.6ubuntu2/debian/patches/series 2014-12-10 16:34:29.000000000 +0000 +++ bsdmainutils-9.0.6ubuntu3/debian/patches/series 2016-03-01 11:32:45.000000000 +0000 @@ -40,3 +40,4 @@ look_bflag.diff write.diff write_allow.diff +fix-big-1stweek.patch diff -Nru bsdmainutils-9.0.6ubuntu2/debian/patches/write_allow.diff bsdmainutils-9.0.6ubuntu3/debian/patches/write_allow.diff --- bsdmainutils-9.0.6ubuntu2/debian/patches/write_allow.diff 2010-10-13 10:57:59.000000000 +0000 +++ bsdmainutils-9.0.6ubuntu3/debian/patches/write_allow.diff 2016-03-01 11:32:42.000000000 +0000 @@ -1,9 +1,11 @@ Description: Allow root to write even without write permissions. Author: Michael Meskes ---- bsdmainutils/usr.bin/write/write.c 2009-10-29 14:24:50.000000000 +0100 -+++ bsdmainutils/usr.bin/write/write.c 2009-10-29 14:28:06.000000000 +0100 -@@ -93,7 +93,7 @@ +Index: bsdmainutils-9.0.6ubuntu2/usr.bin/write/write.c +=================================================================== +--- bsdmainutils-9.0.6ubuntu2.orig/usr.bin/write/write.c ++++ bsdmainutils-9.0.6ubuntu2/usr.bin/write/write.c +@@ -93,7 +93,7 @@ main(int argc, char **argv) time_t atime; uid_t myuid; int msgsok, myttyfd; @@ -12,7 +14,7 @@ (void)setlocale(LC_CTYPE, ""); -@@ -124,7 +124,7 @@ +@@ -124,7 +124,7 @@ main(int argc, char **argv) } if (!msgsok)