diff options
author | Jason E. Hale <jhale@FreeBSD.org> | 2019-12-20 13:03:25 +0000 |
---|---|---|
committer | Jason E. Hale <jhale@FreeBSD.org> | 2019-12-20 13:03:25 +0000 |
commit | 3f8c2c9e03a1239c3cd6c0804f81f5fe2c233300 (patch) | |
tree | 2fdc55808c7e8163d6e7dc63069dbbc3b1943db1 /sysutils/libcdio | |
parent | d37567133af65fbd15511f26ed7b62b85cdeaaba (diff) | |
download | ports-3f8c2c9e03a1239c3cd6c0804f81f5fe2c233300.tar.gz ports-3f8c2c9e03a1239c3cd6c0804f81f5fe2c233300.zip |
sysutils/libcdio: Fix build with GCC versions older than 4.6.0 which do not
allow "#pragma GCC diagnostic" to be used inside of functions
PR: 242693
Reported by: canardo <canardo909@gmx.com>
Notes
Notes:
svn path=/head/; revision=520503
Diffstat (limited to 'sysutils/libcdio')
-rw-r--r-- | sysutils/libcdio/files/patch-lib_iso9660_iso9660.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/sysutils/libcdio/files/patch-lib_iso9660_iso9660.c b/sysutils/libcdio/files/patch-lib_iso9660_iso9660.c new file mode 100644 index 000000000000..14321eeb1cb1 --- /dev/null +++ b/sysutils/libcdio/files/patch-lib_iso9660_iso9660.c @@ -0,0 +1,26 @@ +Fix build on GCC older than 4.6.0 which does not allow #pragma GCC diagnostic +inside of functions. + +PR: 242693 + +--- lib/iso9660/iso9660.c.orig 2019-04-13 15:15:15 UTC ++++ lib/iso9660/iso9660.c +@@ -373,12 +373,18 @@ iso9660_set_ltime_with_timezone(const struct tm *p_tm, + + if (!p_tm) return; + ++#if defined(__GNUC__) && __GNUC__ >= 5 ++#pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wformat-truncation" ++#endif + snprintf(_pvd_date, 17, + "%4.4d%2.2d%2.2d" "%2.2d%2.2d%2.2d" "%2.2d", + p_tm->tm_year + 1900, p_tm->tm_mon + 1, p_tm->tm_mday, + p_tm->tm_hour, p_tm->tm_min, p_tm->tm_sec, + 0 /* 1/100 secs */ ); ++#if defined(__GNUC__) && __GNUC__ >= 5 ++#pragma GCC diagnostic pop ++#endif + + /* Set time zone in 15-minute interval encoding. */ + pvd_date->lt_gmtoff -= (time_zone / 15); |