View | Details | Raw Unified | Return to bug 242693
Collapse All | Expand All

(-)sysutils/libcdio/files/patch-lib_iso9660_iso9660.c (+26 lines)
Line 0 Link Here
1
Fix build on GCC older than 4.6.0 which does not allow #pragma GCC diagnostic
2
inside of functions.
3
4
PR: 242693
5
6
--- lib/iso9660/iso9660.c.orig	2019-04-13 15:15:15 UTC
7
+++ lib/iso9660/iso9660.c
8
@@ -373,12 +373,18 @@ iso9660_set_ltime_with_timezone(const struct tm *p_tm,
9
 
10
   if (!p_tm) return;
11
 
12
+#if defined(__GNUC__) && __GNUC__ >= 5
13
+#pragma GCC diagnostic push
14
 #pragma GCC diagnostic ignored "-Wformat-truncation"
15
+#endif
16
   snprintf(_pvd_date, 17,
17
            "%4.4d%2.2d%2.2d" "%2.2d%2.2d%2.2d" "%2.2d",
18
            p_tm->tm_year + 1900, p_tm->tm_mon + 1, p_tm->tm_mday,
19
            p_tm->tm_hour, p_tm->tm_min, p_tm->tm_sec,
20
            0 /* 1/100 secs */ );
21
+#if defined(__GNUC__) && __GNUC__ >= 5
22
+#pragma GCC diagnostic pop
23
+#endif
24
 
25
   /* Set time zone in 15-minute interval encoding. */
26
   pvd_date->lt_gmtoff -= (time_zone / 15);

Return to bug 242693