aboutsummaryrefslogtreecommitdiffstats
path: root/testing/snapper/musl-__isleap.patch
blob: 5997247cf1f62daf4062bd529e27f906f3dd017e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
The macro __isleap() is defined in glibc's time.h
If it is not defined, define it the same (for musl libc).

--- a/client/utils/equal-date.h	2014-12-11 18:21:17.000000000 +0100
+++ b/client/utils/equal-date.h	2015-08-30 11:18:08.181207315 +0200
@@ -19,6 +19,13 @@
  * find current contact information at www.novell.com.
  */
 
+#if !defined(__isleap)
+/* Nonzero if YEAR is a leap year (every 4 years,
+   except every 100th isn't, and every 400th is).  */
+# define __isleap(year)	\
+  ((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0))
+#endif
+
 
 bool
 equal_year(const struct tm& tmp1, const struct tm& tmp2);